Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I understand. So many years ago I built a fast CP/M emulator using a novel scheme. How did it go now, I remember; lodsb mov ah,al jmp ax. So just three instructions none of which affected the flags. So no need for lahf/sahf. The downside was that I needed 64K to sparsely store my opcode emulations. Opcode 0x00 at 0x0000. 0x01 at 0x0101. 0x02 at 0x0202 etc. In each case the code would just be the direct emulation of the 8080 opcode followed by lodsb mov ah,al jmp ax. Opcode 0xff was a manageable problem. But yes, I just did the 8080 instructions, and I remember now that most CP/M software was fine with that, the Turbo Pascal software was an exception.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: