home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / EXTRA-ST / CPM-80-E / CPM-0.2 / CPM-0 / cpm-0.2 / single.S < prev    next >
Encoding:
Text File  |  1994-06-06  |  1.3 KB  |  60 lines

  1. /*****************************************************************************/
  2. /*                                         */
  3. /*                                         */
  4. /*    CP/M emulator version 0.1                         */
  5. /*                                         */
  6. /*    written by Michael Bischoff (mbi@mo.math.nat.tu-bs.de)             */
  7. /*    June-1994                                 */
  8. /*                                         */
  9. /*    This file is distributed under the GNU COPYRIGHT             */
  10. /*    see COPYRIGHT.GNU for Copyright details                     */
  11. /*                                         */
  12. /*                                         */
  13. /*****************************************************************************/
  14.         .file    "single.s"
  15. gcc2_compiled.:
  16. ___gnu_compiled_c:
  17. .text
  18.         .align 4,0x90
  19.  
  20. #define dispatch    jmp exitemu
  21.  
  22. .globl        _singlestep
  23. _singlestep:
  24.         pushl %ebp
  25.         pushl %esi
  26.         pushl %edi
  27.         pushl %ecx
  28.         pushl %edx
  29.         pushl %ebx
  30.         movzwl _z80regs,%esi
  31.         /* movzwl _z80regs+4,%ebp */
  32.         movl $_z80mem,%ebp
  33.         movzwl _z80regs+8,%ecx
  34.         movzwl _z80regs+12,%edx
  35.         movzwl _z80regs+16,%ebx
  36.         movzwl _z80regs+20,%eax
  37.         movzbl (%esi,%ebp),%edi
  38.         inc %esi
  39.         sall $2,%edi
  40.         jmp jumptab(%edi)
  41.  
  42.         .align 4,0x90
  43. exitemu:    /* decl %esi */
  44.         movw %esi,_z80regs
  45.         /* movw %ebp,_z80regs+4 */
  46.         movw %ecx,_z80regs+8
  47.         movw %edx,_z80regs+12
  48.         movw %ebx,_z80regs+16
  49.         movw %eax,_z80regs+20
  50.         popl %ebx
  51.         popl %edx
  52.         popl %ecx
  53.         popl %edi
  54.         popl %esi
  55.         popl %ebp
  56.         ret
  57.  
  58. #include "code.s"
  59. #include "code2.s"
  60.         .align 4,0x90