• Please review our updated Terms and Rules here

Recent content by dreNorteR

  1. D

    Help with custom autoexec messages?

    Notepad++ (not the same thing as the Notepad built into Windows) calls it OEM-US. https://npp-user-manual.org/docs/preferences/#encoding-menu
  2. D

    Help with custom autoexec messages?

    Try setting the encoding to Western European -> OEM-US or OEM-850
  3. D

    Help with custom autoexec messages?

    By the way, the same Alt+Numpad codes probably still work in Windows 10 (I know they do in Win7). It translates the DOS character codes to Unicode codepoints, to use Unicode directly you type a leading zero. The only problem would be saving the file in the correct codepage - Notepad++ should be...
  4. D

    Help with custom autoexec messages?

    All the documentation you can find online saying to use '^' only applies to Windows's cmd.exe! It is immensely annoying when people keep repeating this as advice for DOS - and no doubt this style of confident-but-wrong responses will only get more frequent, since it's basically what ChatGPT does...
  5. D

    NEC V20: BRKEM, CALLN and RETEM

    What you are saying is that every program, for every system, should either be written in C, or link with a C library. Or you're even assuming that this is already the case, as if C was somehow fundamental to how computers function and there was no way - or at least no reason - to avoid it, ever...
  6. D

    80386 D-bit

    Yes, the 16-bit addressing modes are different from those in 32-bit mode. Intel originally chose to only allow certain combinations of base+index, so that all of them could be encoded in 3 bits - and this was apparently more important than allowing any register to be used. So base must be BX or...
  7. D

    redefining 32-bit

    Compatibility mode is a hardware feature and won't be going away for a long time (you can even still have 16-bit protected mode segments mixed with 32- and 64-bit). Without doing any further research on this, I assume your code is running in ring 0 under UEFI, so even if there is no GDT entry...
  8. D

    redefining 32-bit

    I'm not entirely sure I understand what you're trying to do here. Generate machine code that runs the same in both 32- and 64-bit mode? Why not use (or create, if running on UEFI?) a compatibility segment descriptor for the 32-bit code? In long mode, any update to a 32-bit register will zero...
  9. D

    NEC V20: BRKEM, CALLN and RETEM

    For maximum portability today, you'd write your emulator in JavaScript. Could possibly be made to run on an 8088 too - with a looooooooooooot of patience. But that's kind of the antithesis of what this forum is about.
  10. D

    NEC V20: BRKEM, CALLN and RETEM

    Of course the V20 is obsolete. So is CP/M. But having an x86 CPU run 8080 code natively is more interesting, I think, than doing the same in software emulation :)
  11. D

    NEC V20: BRKEM, CALLN and RETEM

    Yes, it's a lot simpler to have separate vectors. Possibly also for BIOS and BDOS calls, depending on how the code for those is implemented. Was just pointing out a theoretical possibility of how to reuse a single one for both entering 8080 mode and then calling back. Also DOS reserves the INT...
  12. D

    NEC V20: BRKEM, CALLN and RETEM

    It might actually be the best idea to use the low vectors normally reserved for exception handlers. Ordinary application programs are free to take control of these (most run-time libraries do this at least for INT 00h), so anything in the background is guaranteed not to use them. And 8080 code...
  13. D

    CP/M-80 binaries on V20 with PDOS/86-V20

    01 xx xx = 'LXI B,xxxx' (or 'LD BC,xxxx' in Z80 syntax). On x86 it would be 'ADD ew,rw' and not be a valid starting instruction since the register contents are undefined. If the first byte is 31h (or 2Ah), you look at the second byte to see if it is clearing a register using XOR/SUB...
  14. D

    CP/M-80 binaries on V20 with PDOS/86-V20

    But not auto-detection of x86 vs. 8080/Z80 programs ;) The idea is that while .COM files don't have a header, you can look at the first instruction's opcode and determine for which CPU it was intended, with very little possibility of conflict. Because the register contents are undefined, it...
  15. D

    CP/M-80 binaries on V20 with PDOS/86-V20

    You can (almost) perfectly detect if a .com file contains 8080 code by looking at the first one or two bytes. It's somewhat widely known that most CP/M programs start with a jump instruction (because it's convenient to have the entry point somewhere other than the start of the file), opcode...
Back
Top