]> cloudbase.mooo.com Git - avrcpm.git/commitdiff
* Updateted old interpreters
authorLeo <erbl259-lmu@yahoo.de>
Mon, 19 Mar 2012 21:28:26 +0000 (21:28 +0000)
committerLeo <erbl259-lmu@yahoo.de>
Mon, 19 Mar 2012 21:28:26 +0000 (21:28 +0000)
git-svn-id: svn://cu.loc/avr-cpm/avrcpm/trunk@182 57430480-672e-4586-8877-bcf8adbbf3b7

avr/8080int-jmp.asm
avr/8080int-t3-jmp.asm
avr/8080int-t3.asm
avr/8080int.asm
avr/avrcpm.asm

index afa6291bdd02ac641c809d92300d38da2a457d40..23ef64024de7b82047ddba425fa89e9f068be396 100644 (file)
@@ -25,7 +25,7 @@
 ;
 
        .dseg
-       
+z_regs:        
 z_b:   .byte   1
 z_c:   .byte   1
 z_d:   .byte   1
@@ -33,6 +33,60 @@ z_e: .byte   1
 z_h:   .byte   1
 z_l:   .byte   1
 
+       .equ    oz_b = 0
+       .equ    oz_c = 1
+       .equ    oz_d = 2
+       .equ    oz_e = 3
+       .equ    oz_h = 4
+       .equ    oz_l = 5
+
+
+#if EM_Z80
+z_b2:  .byte   1
+z_c2:  .byte   1
+z_d2:  .byte   1
+z_e2:  .byte   1
+z_h2:  .byte   1
+z_l2:  .byte   1
+z_f2:  .byte   1
+z_a2:  .byte   1
+       .equ r2ofs = z_b2-z_b
+       .equ    oz_b2 = 6
+       .equ    oz_c2 = 7
+       .equ    oz_d2 = 8
+       .equ    oz_e2 = 9
+       .equ    oz_h2 = 10
+       .equ    oz_l2 = 11
+       .equ    oz_f2 = 12
+       .equ    oz_a2 = 13
+
+z_xh:  .byte   1
+z_xl:  .byte   1
+z_yh:  .byte   1
+z_yl:  .byte   1
+
+z_i:   .byte   1
+z_r:   .byte   1
+       .equ    oz_xh = 14
+       .equ    oz_xl = 15
+       .equ    oz_yh = 16
+       .equ    oz_yl = 17
+       .equ    oz_i = 18
+       .equ    oz_r = 19
+
+z_istat: .byte 1
+       .equ    oz_istat = 20
+
+       .equ IM_MASK = 0x03             ;Mask IM 0..2
+       .equ IM0     = 0
+       .equ IM1     = 1
+       .equ IM2     = 2
+
+       .equ IFF1 = 2                   ;IFF1 Flag
+       .equ IFF2 = 3                   ;IFF2 Flag
+
+#endif
+
        .cseg
        
 ;Init z80
@@ -65,7 +119,7 @@ notraceon:
        printnewline
        printstring "PC="
        movw temp,z_pcl
-       rcall printhexw
+       lcall printhexw
        printstring " "
 noprintpc:
 .endif
@@ -425,9 +479,9 @@ do_store_am:
 ;|ADC A,s   |***V0*|Add with Carry       |A=A+s+CY              |
 ;|ADC HL,ss |**?V0*|Add with Carry       |HL=HL+ss+CY           |
 ;|ADD A,s   |***V0*|Add                  |A=A+s                 |
-;|ADD HL,ss |--?-0*|Add                  |HL=HL+ss              |
-;|ADD IX,pp |--?-0*|Add                  |IX=IX+pp              |
-;|ADD IY,rr |--?-0*|Add                  |IY=IY+rr              |
+;|ADD HL,ss |--*-0*|Add                  |HL=HL+ss              |
+;|ADD IX,pp |--*-0*|Add                  |IX=IX+pp              |
+;|ADD IY,rr |--*-0*|Add                  |IY=IY+rr              |
 ;|AND s     |**1P00|Logical AND          |A=A&s                 |
 ;|BIT b,m   |?*1?0-|Test Bit             |m&{2^b}               |
 ;|CALL cc,nn|------|Conditional Call     |If cc CALL            |
@@ -443,9 +497,9 @@ do_store_am:
 ;|DEC s     |***V1-|Decrement            |s=s-1                 |
 ;|DEC xx    |------|Decrement            |xx=xx-1               |
 ;|DEC ss    |------|Decrement            |ss=ss-1               |
-;|DI        |------|Disable Interrupts   |                      |
+;|DI        |------|Disable Interrupts   |IFF1 = IFF2 = 0       |
 ;|DJNZ e    |------|Dec., Jump Non-Zero  |B=B-1 till B=0        |
-;|EI        |------|Enable Interrupts    |                      |
+;|EI        |------|Enable Interrupts    |IFF1 = IFF2 = 1       |
 ;|EX [SP],HL|------|Exchange             |[SP]<->HL             |
 ;|EX [SP],xx|------|Exchange             |[SP]<->xx             |
 ;|EX AF,AF' |------|Exchange             |AF<->AF'              |
@@ -506,7 +560,7 @@ do_store_am:
 ;|RRD       |**0P0-|Rotate Right 4 bits  |{A,[HL]}=->{A,[HL]} ##|
 ;|RST p     |------|Restart              | (p=0H,8H,10H,...,38H)|
 ;|SBC A,s   |***V1*|Subtract with Carry  |A=A-s-CY              |
-;|SBC HL,ss |**?V1*|Subtract with Carry  |HL=HL-ss-CY           |
+;|SBC HL,ss |***V1*|Subtract with Carry  |HL=HL-ss-CY           |
 ;|SCF       |--0-01|Set Carry Flag       |CY=1                  |
 ;|SET b,m   |------|Set bit              |m=mv{2^b}             |
 ;|SLA m     |**0P0*|Shift Left Arithmetic|m=m*2                 |
@@ -620,6 +674,12 @@ do_store_am:
 #endif
 .endm
 
+.macro do_z80_flags_H
+#if EM_Z80
+       bmov    z_flags, ZFL_H, temp, AVR_H
+#endif
+.endm
+
 .macro do_z80_flags_set_N
 #if EM_Z80
        ori     z_flags, (1<<ZFL_N)       ; Negation auf 1
@@ -698,10 +758,10 @@ do_op_outa: ; out (opl),a
        printnewline
        printstring "Port write: "
        mov temp,z_a
-       rcall printhex
+       lcall printhex
        printstring " -> ("
        mov temp,opl
-       rcall printhex
+       lcall printhex
        printstring ") "
 .endif
        mov temp,z_a
@@ -715,21 +775,21 @@ do_op_outa: ; out (opl),a
 ;|IN A,[n]  |------|Input                |A=[n]                 |
 ;
 ;
-do_op_in:      ; in a,(opl)
+do_op_ina:                             ; in a,(opl)
 .if PORT_DEBUG
        printnewline
        printstring "Port read: ("
        mov temp,opl
-       rcall printhex
+       lcall printhex
        printstring ") -> "
 .endif
 
        mov temp2,opl
        lcall portRead
-       mov opl,temp
+       mov z_a,temp
 
 .if PORT_DEBUG
-       rcall printhex
+       lcall printhex
        printstring " "
 .endif
        ret
@@ -1054,9 +1114,11 @@ do_op_addhl:
        lds     temp2,z_h
        add opl,temp
        adc oph,temp2
+       sts     z_l,opl
+       sts     z_h,oph
        in temp,sreg
-       bmov    z_flags,ZFL_H, temp,AVR_H
        bmov    z_flags,ZFL_C, temp,AVR_C
+       do_z80_flags_H
        do_z80_flags_clear_N
        ret
 
@@ -1391,7 +1453,7 @@ do_op_ifnz:
        sbrs z_flags, ZFL_Z
        ret
        pop     temp                            ; nix tun
-       pop temp                                ; direkt zuruech zu main        
+       pop temp                                ; direkt zurueck zu main        
        ret
 
 ;----------------------------------------------------------------
@@ -1406,7 +1468,7 @@ do_op_ifz:
        sbrc z_flags, ZFL_Z
        ret
        pop     temp                            ; nix tun
-       pop temp                                ; direkt zuruech zu main        
+       pop temp                                ; direkt zurueck zu main        
        ret
 
 ;----------------------------------------------------------------
@@ -1519,7 +1581,7 @@ instr     do_fetch_B,     op_DEC,         do_store_B      ;05             ;DEC B
 instr  do_fetch_DIR8,  op_nop,         do_store_B      ;06             ;LD B,n
 instr  do_fetch_nop,   op_RLCA,        do_store_nop    ;07             ;RLCA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;08             ;EX AF,AF'
-instr  do_fetch_BC,    op_ADDHL,       do_store_HL     ;09             ;ADD HL,BC
+instr  do_fetch_BC,    op_ADDHL,       do_store_nop    ;09             ;ADD HL,BC
 instr  do_fetch_MBC,   op_nop,         do_store_nop    ;0A             ;LD A,(BC)
 instr  do_fetch_BC,    op_DEC16,       do_store_BC     ;0B             ;DEC BC
 instr  do_fetch_C,     op_INC,         do_store_C      ;0C             ;INC C
@@ -1535,7 +1597,7 @@ instr     do_fetch_D,     op_DEC,         do_store_D      ;15             ;DEC D
 instr  do_fetch_DIR8,  op_nop,         do_store_D      ;16 nn          ;LD D,n
 instr  do_fetch_nop,   op_RLA,         do_store_nop    ;17             ;RLA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;18 oo          ;JR o
-instr  do_fetch_DE,    op_ADDHL,       do_store_HL     ;19             ;ADD HL,DE
+instr  do_fetch_DE,    op_ADDHL,       do_store_nop    ;19             ;ADD HL,DE
 instr  do_fetch_MDE,   op_nop,         do_store_nop    ;1A             ;LD A,(DE)
 instr  do_fetch_DE,    op_DEC16,       do_store_DE     ;1B             ;DEC DE
 instr  do_fetch_E,     op_INC,         do_store_E      ;1C             ;INC E
@@ -1551,7 +1613,7 @@ instr     do_fetch_H,     op_DEC,         do_store_H      ;25             ;DEC H
 instr  do_fetch_DIR8,  op_nop,         do_store_H      ;26 nn          ;LD H,n
 instr  do_fetch_A,     op_DA,          do_store_A      ;27             ;DAA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;28 oo          ;JR Z,o
-instr  do_fetch_HL,    op_ADDHL,       do_store_HL     ;29             ;ADD HL,HL
+instr  do_fetch_HL,    op_ADDHL,       do_store_nop    ;29             ;ADD HL,HL
 instr  do_fetch_DIR16, op_RMEM16,      do_store_HL     ;2A nn nn       ;LD HL,(nn)
 instr  do_fetch_HL,    op_DEC16,       do_store_HL     ;2B             ;DEC HL
 instr  do_fetch_L,     op_INC,         do_store_L      ;2C             ;INC L
@@ -1567,7 +1629,7 @@ instr     do_fetch_MHL,   op_DEC,         do_store_MHL    ;35             ;DEC (HL)
 instr  do_fetch_DIR8,  op_nop,         do_store_MHL    ;36 nn          ;LD (HL),n
 instr  do_fetch_nop,   op_SCF,         do_store_nop    ;37             ;SCF
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;38 oo          ;JR C,o
-instr  do_fetch_SP,    op_ADDHL,       do_store_HL     ;39             ;ADD HL,SP
+instr  do_fetch_SP,    op_ADDHL,       do_store_nop    ;39             ;ADD HL,SP
 instr  do_fetch_DIR16, op_RMEM8,       do_store_A      ;3A nn nn       ;LD A,(nn)
 instr  do_fetch_SP,    op_DEC16,       do_store_SP     ;3B             ;DEC SP
 instr  do_fetch_nop,   op_INCA,        do_store_nop    ;3C             ;INC A
@@ -1630,7 +1692,7 @@ instr     do_fetch_H,     op_nop,         do_store_MHL    ;74             ;LD (HL),H
 instr  do_fetch_L,     op_nop,         do_store_MHL    ;75             ;LD (HL),L
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;76             ;HALT
 instr  do_fetch_A,     op_nop,         do_store_MHL    ;77             ;LD (HL),A
-instr  do_fetch_b,     op_nop,         do_store_A      ;78             ;LD A,B
+instr  do_fetch_B,     op_nop,         do_store_A      ;78             ;LD A,B
 instr  do_fetch_C,     op_nop,         do_store_A      ;79             ;LD A,C
 instr  do_fetch_D,     op_nop,         do_store_A      ;7A             ;LD A,D
 instr  do_fetch_E,     op_nop,         do_store_A      ;7B             ;LD A,E
@@ -1729,7 +1791,7 @@ instr     do_fetch_RST,   op_nop,         do_store_CALL   ;D7             ;RST 10H
 instr  do_fetch_nop,   op_IFC,         do_store_RET    ;D8             ;RET C
 instr  do_fetch_nop,   op_nop,         do_store_nop    ;D9             ;EXX
 instr  do_fetch_DIR16, op_IFC,         do_store_PC     ;DA nn nn       ;JP C,nn
-instr  do_fetch_DIR8,  op_IN,          do_store_A      ;DB nn          ;IN A,(n)
+instr  do_fetch_DIR8,  op_INA,         do_store_nop    ;DB nn          ;IN A,(n)
 instr  do_fetch_DIR16, op_IFC,         do_store_CALL   ;DC nn nn       ;CALL C,nn
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;DD             ;(Z80 specific)
 instr  do_fetch_DIR8,  op_SBCFA,       do_store_nop    ;DE nn          ;SBC A,n
index 2bcf3f19da6b25902ce80c6b048a467002a7d0a0..ca9fc72d97608c2fa1a67c7fc345ceb2b0a054c7 100644 (file)
@@ -33,6 +33,60 @@ z_e: .byte   1
 z_h:   .byte   1
 z_l:   .byte   1
 
+       .equ    oz_b = 0
+       .equ    oz_c = 1
+       .equ    oz_d = 2
+       .equ    oz_e = 3
+       .equ    oz_h = 4
+       .equ    oz_l = 5
+
+
+#if EM_Z80
+z_b2:  .byte   1
+z_c2:  .byte   1
+z_d2:  .byte   1
+z_e2:  .byte   1
+z_h2:  .byte   1
+z_l2:  .byte   1
+z_f2:  .byte   1
+z_a2:  .byte   1
+       .equ r2ofs = z_b2-z_b
+       .equ    oz_b2 = 6
+       .equ    oz_c2 = 7
+       .equ    oz_d2 = 8
+       .equ    oz_e2 = 9
+       .equ    oz_h2 = 10
+       .equ    oz_l2 = 11
+       .equ    oz_f2 = 12
+       .equ    oz_a2 = 13
+
+z_xh:  .byte   1
+z_xl:  .byte   1
+z_yh:  .byte   1
+z_yl:  .byte   1
+
+z_i:   .byte   1
+z_r:   .byte   1
+       .equ    oz_xh = 14
+       .equ    oz_xl = 15
+       .equ    oz_yh = 16
+       .equ    oz_yl = 17
+       .equ    oz_i = 18
+       .equ    oz_r = 19
+
+z_istat: .byte 1
+       .equ    oz_istat = 20
+
+       .equ IM_MASK = 0x03             ;Mask IM 0..2
+       .equ IM0     = 0
+       .equ IM1     = 1
+       .equ IM2     = 2
+
+       .equ IFF1 = 2                   ;IFF1 Flag
+       .equ IFF2 = 3                   ;IFF2 Flag
+
+#endif
+
        .cseg
        
 ;Init z80
@@ -65,7 +119,7 @@ notraceon:
        printnewline
        printstring "PC="
        movw temp,z_pcl
-       rcall printhexw
+       lcall printhexw
        printstring " "
 noprintpc:
 .endif
@@ -444,7 +498,7 @@ opjumps:
        gen_opjmp op_ifp
        gen_opjmp op_ifm
        gen_opjmp op_outa
-       gen_opjmp op_in
+       gen_opjmp op_ina
        gen_opjmp op_exhl
        gen_opjmp op_di
        gen_opjmp op_ei
@@ -476,9 +530,9 @@ opjumps:
 ;|ADC A,s   |***V0*|Add with Carry       |A=A+s+CY              |
 ;|ADC HL,ss |**?V0*|Add with Carry       |HL=HL+ss+CY           |
 ;|ADD A,s   |***V0*|Add                  |A=A+s                 |
-;|ADD HL,ss |--?-0*|Add                  |HL=HL+ss              |
-;|ADD IX,pp |--?-0*|Add                  |IX=IX+pp              |
-;|ADD IY,rr |--?-0*|Add                  |IY=IY+rr              |
+;|ADD HL,ss |--*-0*|Add                  |HL=HL+ss              |
+;|ADD IX,pp |--*-0*|Add                  |IX=IX+pp              |
+;|ADD IY,rr |--*-0*|Add                  |IY=IY+rr              |
 ;|AND s     |**1P00|Logical AND          |A=A&s                 |
 ;|BIT b,m   |?*1?0-|Test Bit             |m&{2^b}               |
 ;|CALL cc,nn|------|Conditional Call     |If cc CALL            |
@@ -494,9 +548,9 @@ opjumps:
 ;|DEC s     |***V1-|Decrement            |s=s-1                 |
 ;|DEC xx    |------|Decrement            |xx=xx-1               |
 ;|DEC ss    |------|Decrement            |ss=ss-1               |
-;|DI        |------|Disable Interrupts   |                      |
+;|DI        |------|Disable Interrupts   |IFF1 = IFF2 = 0       |
 ;|DJNZ e    |------|Dec., Jump Non-Zero  |B=B-1 till B=0        |
-;|EI        |------|Enable Interrupts    |                      |
+;|EI        |------|Enable Interrupts    |IFF1 = IFF2 = 1       |
 ;|EX [SP],HL|------|Exchange             |[SP]<->HL             |
 ;|EX [SP],xx|------|Exchange             |[SP]<->xx             |
 ;|EX AF,AF' |------|Exchange             |AF<->AF'              |
@@ -557,7 +611,7 @@ opjumps:
 ;|RRD       |**0P0-|Rotate Right 4 bits  |{A,[HL]}=->{A,[HL]} ##|
 ;|RST p     |------|Restart              | (p=0H,8H,10H,...,38H)|
 ;|SBC A,s   |***V1*|Subtract with Carry  |A=A-s-CY              |
-;|SBC HL,ss |**?V1*|Subtract with Carry  |HL=HL-ss-CY           |
+;|SBC HL,ss |***V1*|Subtract with Carry  |HL=HL-ss-CY           |
 ;|SCF       |--0-01|Set Carry Flag       |CY=1                  |
 ;|SET b,m   |------|Set bit              |m=mv{2^b}             |
 ;|SLA m     |**0P0*|Shift Left Arithmetic|m=m*2                 |
@@ -671,6 +725,12 @@ opjumps:
 #endif
 .endm
 
+.macro do_z80_flags_H
+#if EM_Z80
+       bmov    z_flags, ZFL_H, temp, AVR_H
+#endif
+.endm
+
 .macro do_z80_flags_set_N
 #if EM_Z80
        ori     z_flags, (1<<ZFL_N)       ; Negation auf 1
@@ -749,10 +809,10 @@ do_op_outa: ; out (opl),a
        printnewline
        printstring "Port write: "
        mov temp,z_a
-       rcall printhex
+       lcall printhex
        printstring " -> ("
        mov temp,opl
-       rcall printhex
+       lcall printhex
        printstring ") "
 .endif
        mov temp,z_a
@@ -766,21 +826,21 @@ do_op_outa: ; out (opl),a
 ;|IN A,[n]  |------|Input                |A=[n]                 |
 ;
 ;
-do_op_in:      ; in a,(opl)
+do_op_ina:                             ; in a,(opl)
 .if PORT_DEBUG
        printnewline
        printstring "Port read: ("
        mov temp,opl
-       rcall printhex
+       lcall printhex
        printstring ") -> "
 .endif
 
        mov temp2,opl
        lcall portRead
-       mov opl,temp
+       mov z_a,temp
 
 .if PORT_DEBUG
-       rcall printhex
+       lcall printhex
        printstring " "
 .endif
        op_end
@@ -1105,9 +1165,11 @@ do_op_addhl:
        lds     temp2,z_h
        add opl,temp
        adc oph,temp2
+       sts     z_l,opl
+       sts     z_h,oph
        in temp,sreg
-       bmov    z_flags,ZFL_H, temp,AVR_H
        bmov    z_flags,ZFL_C, temp,AVR_C
+       do_z80_flags_H
        do_z80_flags_clear_N
        op_end
 
@@ -1552,7 +1614,7 @@ instr     do_fetch_B,     op_DEC,         do_store_B      ;05             ;DEC B
 instr  do_fetch_DIR8,  op_nop,         do_store_B      ;06             ;LD B,n
 instr  do_fetch_nop,   op_RLCA,        do_store_nop    ;07             ;RLCA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;08             ;EX AF,AF'
-instr  do_fetch_BC,    op_ADDHL,       do_store_HL     ;09             ;ADD HL,BC
+instr  do_fetch_BC,    op_ADDHL,       do_store_nop    ;09             ;ADD HL,BC
 instr  do_fetch_MBC,   op_nop,         do_store_nop    ;0A             ;LD A,(BC)
 instr  do_fetch_BC,    op_DEC16,       do_store_BC     ;0B             ;DEC BC
 instr  do_fetch_C,     op_INC,         do_store_C      ;0C             ;INC C
@@ -1568,7 +1630,7 @@ instr     do_fetch_D,     op_DEC,         do_store_D      ;15             ;DEC D
 instr  do_fetch_DIR8,  op_nop,         do_store_D      ;16 nn          ;LD D,n
 instr  do_fetch_nop,   op_RLA,         do_store_nop    ;17             ;RLA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;18 oo          ;JR o
-instr  do_fetch_DE,    op_ADDHL,       do_store_HL     ;19             ;ADD HL,DE
+instr  do_fetch_DE,    op_ADDHL,       do_store_nop    ;19             ;ADD HL,DE
 instr  do_fetch_MDE,   op_nop,         do_store_nop    ;1A             ;LD A,(DE)
 instr  do_fetch_DE,    op_DEC16,       do_store_DE     ;1B             ;DEC DE
 instr  do_fetch_E,     op_INC,         do_store_E      ;1C             ;INC E
@@ -1584,7 +1646,7 @@ instr     do_fetch_H,     op_DEC,         do_store_H      ;25             ;DEC H
 instr  do_fetch_DIR8,  op_nop,         do_store_H      ;26 nn          ;LD H,n
 instr  do_fetch_A,     op_DA,          do_store_A      ;27             ;DAA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;28 oo          ;JR Z,o
-instr  do_fetch_HL,    op_ADDHL,       do_store_HL     ;29             ;ADD HL,HL
+instr  do_fetch_HL,    op_ADDHL,       do_store_nop    ;29             ;ADD HL,HL
 instr  do_fetch_DIR16, op_RMEM16,      do_store_HL     ;2A nn nn       ;LD HL,(nn)
 instr  do_fetch_HL,    op_DEC16,       do_store_HL     ;2B             ;DEC HL
 instr  do_fetch_L,     op_INC,         do_store_L      ;2C             ;INC L
@@ -1600,7 +1662,7 @@ instr     do_fetch_MHL,   op_DEC,         do_store_MHL    ;35             ;DEC (HL)
 instr  do_fetch_DIR8,  op_nop,         do_store_MHL    ;36 nn          ;LD (HL),n
 instr  do_fetch_nop,   op_SCF,         do_store_nop    ;37             ;SCF
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;38 oo          ;JR C,o
-instr  do_fetch_SP,    op_ADDHL,       do_store_HL     ;39             ;ADD HL,SP
+instr  do_fetch_SP,    op_ADDHL,       do_store_nop    ;39             ;ADD HL,SP
 instr  do_fetch_DIR16, op_RMEM8,       do_store_A      ;3A nn nn       ;LD A,(nn)
 instr  do_fetch_SP,    op_DEC16,       do_store_SP     ;3B             ;DEC SP
 instr  do_fetch_nop,   op_INCA,        do_store_nop    ;3C             ;INC A
@@ -1762,7 +1824,7 @@ instr     do_fetch_RST,   op_nop,         do_store_CALL   ;D7             ;RST 10H
 instr  do_fetch_nop,   op_IFC,         do_store_RET    ;D8             ;RET C
 instr  do_fetch_nop,   op_nop,         do_store_nop    ;D9             ;EXX
 instr  do_fetch_DIR16, op_IFC,         do_store_PC     ;DA nn nn       ;JP C,nn
-instr  do_fetch_DIR8,  op_IN,          do_store_A      ;DB nn          ;IN A,(n)
+instr  do_fetch_DIR8,  op_INA,         do_store_nop    ;DB nn          ;IN A,(n)
 instr  do_fetch_DIR16, op_IFC,         do_store_CALL   ;DC nn nn       ;CALL C,nn
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;DD             ;(Z80 specific)
 instr  do_fetch_DIR8,  op_SBCFA,       do_store_nop    ;DE nn          ;SBC A,n
index 705f356670335209cd09fcaa39d633f4a48b5863..130e4cee350491cb9eaf73e05c5c999b78a6ab37 100644 (file)
@@ -25,7 +25,7 @@
 ;
 
        .dseg
-       
+z_regs:        
 z_b:   .byte   1
 z_c:   .byte   1
 z_d:   .byte   1
@@ -33,6 +33,60 @@ z_e: .byte   1
 z_h:   .byte   1
 z_l:   .byte   1
 
+       .equ    oz_b = 0
+       .equ    oz_c = 1
+       .equ    oz_d = 2
+       .equ    oz_e = 3
+       .equ    oz_h = 4
+       .equ    oz_l = 5
+
+
+#if EM_Z80
+z_b2:  .byte   1
+z_c2:  .byte   1
+z_d2:  .byte   1
+z_e2:  .byte   1
+z_h2:  .byte   1
+z_l2:  .byte   1
+z_f2:  .byte   1
+z_a2:  .byte   1
+       .equ r2ofs = z_b2-z_b
+       .equ    oz_b2 = 6
+       .equ    oz_c2 = 7
+       .equ    oz_d2 = 8
+       .equ    oz_e2 = 9
+       .equ    oz_h2 = 10
+       .equ    oz_l2 = 11
+       .equ    oz_f2 = 12
+       .equ    oz_a2 = 13
+
+z_xh:  .byte   1
+z_xl:  .byte   1
+z_yh:  .byte   1
+z_yl:  .byte   1
+
+z_i:   .byte   1
+z_r:   .byte   1
+       .equ    oz_xh = 14
+       .equ    oz_xl = 15
+       .equ    oz_yh = 16
+       .equ    oz_yl = 17
+       .equ    oz_i = 18
+       .equ    oz_r = 19
+
+z_istat: .byte 1
+       .equ    oz_istat = 20
+
+       .equ IM_MASK = 0x03             ;Mask IM 0..2
+       .equ IM0     = 0
+       .equ IM1     = 1
+       .equ IM2     = 2
+
+       .equ IFF1 = 2                   ;IFF1 Flag
+       .equ IFF2 = 3                   ;IFF2 Flag
+
+#endif
+
        .cseg
 
 ;Init z80
@@ -78,7 +132,7 @@ notraceon:
        printnewline
        printstring "PC="
        movw temp,z_pcl
-       rcall printhexw
+       lcall printhexw
        printstring " "
 noprintpc:
 .endif
@@ -471,7 +525,7 @@ opjumps:
        gen_opjmp op_ifp
        gen_opjmp op_ifm
        gen_opjmp op_outa
-       gen_opjmp op_in
+       gen_opjmp op_ina
        gen_opjmp op_exhl
        gen_opjmp op_di
        gen_opjmp op_ei
@@ -502,9 +556,9 @@ opjumps:
 ;|ADC A,s   |***V0*|Add with Carry       |A=A+s+CY              |
 ;|ADC HL,ss |**?V0*|Add with Carry       |HL=HL+ss+CY           |
 ;|ADD A,s   |***V0*|Add                  |A=A+s                 |
-;|ADD HL,ss |--?-0*|Add                  |HL=HL+ss              |
-;|ADD IX,pp |--?-0*|Add                  |IX=IX+pp              |
-;|ADD IY,rr |--?-0*|Add                  |IY=IY+rr              |
+;|ADD HL,ss |--*-0*|Add                  |HL=HL+ss              |
+;|ADD IX,pp |--*-0*|Add                  |IX=IX+pp              |
+;|ADD IY,rr |--*-0*|Add                  |IY=IY+rr              |
 ;|AND s     |**1P00|Logical AND          |A=A&s                 |
 ;|BIT b,m   |?*1?0-|Test Bit             |m&{2^b}               |
 ;|CALL cc,nn|------|Conditional Call     |If cc CALL            |
@@ -520,9 +574,9 @@ opjumps:
 ;|DEC s     |***V1-|Decrement            |s=s-1                 |
 ;|DEC xx    |------|Decrement            |xx=xx-1               |
 ;|DEC ss    |------|Decrement            |ss=ss-1               |
-;|DI        |------|Disable Interrupts   |                      |
+;|DI        |------|Disable Interrupts   |IFF1 = IFF2 = 0       |
 ;|DJNZ e    |------|Dec., Jump Non-Zero  |B=B-1 till B=0        |
-;|EI        |------|Enable Interrupts    |                      |
+;|EI        |------|Enable Interrupts    |IFF1 = IFF2 = 1       |
 ;|EX [SP],HL|------|Exchange             |[SP]<->HL             |
 ;|EX [SP],xx|------|Exchange             |[SP]<->xx             |
 ;|EX AF,AF' |------|Exchange             |AF<->AF'              |
@@ -583,7 +637,7 @@ opjumps:
 ;|RRD       |**0P0-|Rotate Right 4 bits  |{A,[HL]}=->{A,[HL]} ##|
 ;|RST p     |------|Restart              | (p=0H,8H,10H,...,38H)|
 ;|SBC A,s   |***V1*|Subtract with Carry  |A=A-s-CY              |
-;|SBC HL,ss |**?V1*|Subtract with Carry  |HL=HL-ss-CY           |
+;|SBC HL,ss |***V1*|Subtract with Carry  |HL=HL-ss-CY           |
 ;|SCF       |--0-01|Set Carry Flag       |CY=1                  |
 ;|SET b,m   |------|Set bit              |m=mv{2^b}             |
 ;|SLA m     |**0P0*|Shift Left Arithmetic|m=m*2                 |
@@ -697,6 +751,12 @@ opjumps:
 #endif
 .endm
 
+.macro do_z80_flags_H
+#if EM_Z80
+       bmov    z_flags, ZFL_H, temp, AVR_H
+#endif
+.endm
+
 .macro do_z80_flags_set_N
 #if EM_Z80
        ori     z_flags, (1<<ZFL_N)       ; Negation auf 1
@@ -775,10 +835,10 @@ do_op_outa: ; out (opl),a
        printnewline
        printstring "Port write: "
        mov temp,z_a
-       rcall printhex
+       lcall printhex
        printstring " -> ("
        mov temp,opl
-       rcall printhex
+       lcall printhex
        printstring ") "
 .endif
        mov temp,z_a
@@ -792,21 +852,21 @@ do_op_outa: ; out (opl),a
 ;|IN A,[n]  |------|Input                |A=[n]                 |
 ;
 ;
-do_op_in:      ; in a,(opl)
+do_op_ina:                             ; in a,(opl)
 .if PORT_DEBUG
        printnewline
        printstring "Port read: ("
        mov temp,opl
-       rcall printhex
+       lcall printhex
        printstring ") -> "
 .endif
 
        mov temp2,opl
        lcall portRead
-       mov opl,temp
+       mov z_a,temp
 
 .if PORT_DEBUG
-       rcall printhex
+       lcall printhex
        printstring " "
 .endif
        ret
@@ -1131,9 +1191,11 @@ do_op_addhl:
        lds     temp2,z_h
        add opl,temp
        adc oph,temp2
+       sts     z_l,opl
+       sts     z_h,oph
        in temp,sreg
-       bmov    z_flags,ZFL_H, temp,AVR_H
        bmov    z_flags,ZFL_C, temp,AVR_C
+       do_z80_flags_H
        do_z80_flags_clear_N
        ret
 
@@ -1468,7 +1530,7 @@ do_op_ifnz:
        sbrs z_flags, ZFL_Z
        ret
        pop     temp                            ; nix tun
-       pop temp                                ; direkt zuruech zu main        
+       pop temp                                ; direkt zurueck zu main        
        ret
 
 ;----------------------------------------------------------------
@@ -1483,7 +1545,7 @@ do_op_ifz:
        sbrc z_flags, ZFL_Z
        ret
        pop     temp                            ; nix tun
-       pop temp                                ; direkt zuruech zu main        
+       pop temp                                ; direkt zurueck zu main        
        ret
 
 ;----------------------------------------------------------------
@@ -1594,7 +1656,7 @@ instr     do_fetch_B,     op_DEC,         do_store_B      ;05             ;DEC B
 instr  do_fetch_DIR8,  op_nop,         do_store_B      ;06             ;LD B,n
 instr  do_fetch_nop,   op_RLCA,        do_store_nop    ;07             ;RLCA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;08             ;EX AF,AF'
-instr  do_fetch_BC,    op_ADDHL,       do_store_HL     ;09             ;ADD HL,BC
+instr  do_fetch_BC,    op_ADDHL,       do_store_nop    ;09             ;ADD HL,BC
 instr  do_fetch_MBC,   op_nop,         do_store_nop    ;0A             ;LD A,(BC)
 instr  do_fetch_BC,    op_DEC16,       do_store_BC     ;0B             ;DEC BC
 instr  do_fetch_C,     op_INC,         do_store_C      ;0C             ;INC C
@@ -1610,7 +1672,7 @@ instr     do_fetch_D,     op_DEC,         do_store_D      ;15             ;DEC D
 instr  do_fetch_DIR8,  op_nop,         do_store_D      ;16 nn          ;LD D,n
 instr  do_fetch_nop,   op_RLA,         do_store_nop    ;17             ;RLA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;18 oo          ;JR o
-instr  do_fetch_DE,    op_ADDHL,       do_store_HL     ;19             ;ADD HL,DE
+instr  do_fetch_DE,    op_ADDHL,       do_store_nop    ;19             ;ADD HL,DE
 instr  do_fetch_MDE,   op_nop,         do_store_nop    ;1A             ;LD A,(DE)
 instr  do_fetch_DE,    op_DEC16,       do_store_DE     ;1B             ;DEC DE
 instr  do_fetch_E,     op_INC,         do_store_E      ;1C             ;INC E
@@ -1626,7 +1688,7 @@ instr     do_fetch_H,     op_DEC,         do_store_H      ;25             ;DEC H
 instr  do_fetch_DIR8,  op_nop,         do_store_H      ;26 nn          ;LD H,n
 instr  do_fetch_A,     op_DA,          do_store_A      ;27             ;DAA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;28 oo          ;JR Z,o
-instr  do_fetch_HL,    op_ADDHL,       do_store_HL     ;29             ;ADD HL,HL
+instr  do_fetch_HL,    op_ADDHL,       do_store_nop    ;29             ;ADD HL,HL
 instr  do_fetch_DIR16, op_RMEM16,      do_store_HL     ;2A nn nn       ;LD HL,(nn)
 instr  do_fetch_HL,    op_DEC16,       do_store_HL     ;2B             ;DEC HL
 instr  do_fetch_L,     op_INC,         do_store_L      ;2C             ;INC L
@@ -1642,7 +1704,7 @@ instr     do_fetch_MHL,   op_DEC,         do_store_MHL    ;35             ;DEC (HL)
 instr  do_fetch_DIR8,  op_nop,         do_store_MHL    ;36 nn          ;LD (HL),n
 instr  do_fetch_nop,   op_SCF,         do_store_nop    ;37             ;SCF
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;38 oo          ;JR C,o
-instr  do_fetch_SP,    op_ADDHL,       do_store_HL     ;39             ;ADD HL,SP
+instr  do_fetch_SP,    op_ADDHL,       do_store_nop    ;39             ;ADD HL,SP
 instr  do_fetch_DIR16, op_RMEM8,       do_store_A      ;3A nn nn       ;LD A,(nn)
 instr  do_fetch_SP,    op_DEC16,       do_store_SP     ;3B             ;DEC SP
 instr  do_fetch_nop,   op_INCA,        do_store_nop    ;3C             ;INC A
@@ -1804,7 +1866,7 @@ instr     do_fetch_RST,   op_nop,         do_store_CALL   ;D7             ;RST 10H
 instr  do_fetch_nop,   op_IFC,         do_store_RET    ;D8             ;RET C
 instr  do_fetch_nop,   op_nop,         do_store_nop    ;D9             ;EXX
 instr  do_fetch_DIR16, op_IFC,         do_store_PC     ;DA nn nn       ;JP C,nn
-instr  do_fetch_DIR8,  op_IN,          do_store_A      ;DB nn          ;IN A,(n)
+instr  do_fetch_DIR8,  op_INA,         do_store_nop    ;DB nn          ;IN A,(n)
 instr  do_fetch_DIR16, op_IFC,         do_store_CALL   ;DC nn nn       ;CALL C,nn
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;DD             ;(Z80 specific)
 instr  do_fetch_DIR8,  op_SBCFA,       do_store_nop    ;DE nn          ;SBC A,n
index f3967bb2761d7531f7779fced27d3bc0d694cb1e..5e68a92a0d34e54fb22210653858293b38192daa 100644 (file)
@@ -43,6 +43,60 @@ z_e: .byte   1
 z_h:   .byte   1
 z_l:   .byte   1
 
+       .equ    oz_b = 0
+       .equ    oz_c = 1
+       .equ    oz_d = 2
+       .equ    oz_e = 3
+       .equ    oz_h = 4
+       .equ    oz_l = 5
+
+
+#if EM_Z80
+z_b2:  .byte   1
+z_c2:  .byte   1
+z_d2:  .byte   1
+z_e2:  .byte   1
+z_h2:  .byte   1
+z_l2:  .byte   1
+z_f2:  .byte   1
+z_a2:  .byte   1
+       .equ r2ofs = z_b2-z_b
+       .equ    oz_b2 = 6
+       .equ    oz_c2 = 7
+       .equ    oz_d2 = 8
+       .equ    oz_e2 = 9
+       .equ    oz_h2 = 10
+       .equ    oz_l2 = 11
+       .equ    oz_f2 = 12
+       .equ    oz_a2 = 13
+
+z_xh:  .byte   1
+z_xl:  .byte   1
+z_yh:  .byte   1
+z_yl:  .byte   1
+
+z_i:   .byte   1
+z_r:   .byte   1
+       .equ    oz_xh = 14
+       .equ    oz_xl = 15
+       .equ    oz_yh = 16
+       .equ    oz_yl = 17
+       .equ    oz_i = 18
+       .equ    oz_r = 19
+
+z_istat: .byte 1
+       .equ    oz_istat = 20
+
+       .equ IM_MASK = 0x03             ;Mask IM 0..2
+       .equ IM0     = 0
+       .equ IM1     = 1
+       .equ IM2     = 2
+
+       .equ IFF1 = 2                   ;IFF1 Flag
+       .equ IFF2 = 3                   ;IFF2 Flag
+
+#endif
+
        .cseg
 
 ;Init z80
@@ -88,7 +142,7 @@ notraceon:
        printnewline
        printstring "PC="
        movw temp,z_pcl
-       rcall printhexw
+       lcall printhexw
        printstring " "
 noprintpc:
 .endif
@@ -392,9 +446,9 @@ do_store_am:
 ;|ADC A,s   |***V0*|Add with Carry       |A=A+s+CY              |
 ;|ADC HL,ss |**?V0*|Add with Carry       |HL=HL+ss+CY           |
 ;|ADD A,s   |***V0*|Add                  |A=A+s                 |
-;|ADD HL,ss |--?-0*|Add                  |HL=HL+ss              |
-;|ADD IX,pp |--?-0*|Add                  |IX=IX+pp              |
-;|ADD IY,rr |--?-0*|Add                  |IY=IY+rr              |
+;|ADD HL,ss |--*-0*|Add                  |HL=HL+ss              |
+;|ADD IX,pp |--*-0*|Add                  |IX=IX+pp              |
+;|ADD IY,rr |--*-0*|Add                  |IY=IY+rr              |
 ;|AND s     |**1P00|Logical AND          |A=A&s                 |
 ;|BIT b,m   |?*1?0-|Test Bit             |m&{2^b}               |
 ;|CALL cc,nn|------|Conditional Call     |If cc CALL            |
@@ -410,9 +464,9 @@ do_store_am:
 ;|DEC s     |***V1-|Decrement            |s=s-1                 |
 ;|DEC xx    |------|Decrement            |xx=xx-1               |
 ;|DEC ss    |------|Decrement            |ss=ss-1               |
-;|DI        |------|Disable Interrupts   |                      |
+;|DI        |------|Disable Interrupts   |IFF1 = IFF2 = 0       |
 ;|DJNZ e    |------|Dec., Jump Non-Zero  |B=B-1 till B=0        |
-;|EI        |------|Enable Interrupts    |                      |
+;|EI        |------|Enable Interrupts    |IFF1 = IFF2 = 1       |
 ;|EX [SP],HL|------|Exchange             |[SP]<->HL             |
 ;|EX [SP],xx|------|Exchange             |[SP]<->xx             |
 ;|EX AF,AF' |------|Exchange             |AF<->AF'              |
@@ -473,7 +527,7 @@ do_store_am:
 ;|RRD       |**0P0-|Rotate Right 4 bits  |{A,[HL]}=->{A,[HL]} ##|
 ;|RST p     |------|Restart              | (p=0H,8H,10H,...,38H)|
 ;|SBC A,s   |***V1*|Subtract with Carry  |A=A-s-CY              |
-;|SBC HL,ss |**?V1*|Subtract with Carry  |HL=HL-ss-CY           |
+;|SBC HL,ss |***V1*|Subtract with Carry  |HL=HL-ss-CY           |
 ;|SCF       |--0-01|Set Carry Flag       |CY=1                  |
 ;|SET b,m   |------|Set bit              |m=mv{2^b}             |
 ;|SLA m     |**0P0*|Shift Left Arithmetic|m=m*2                 |
@@ -587,6 +641,12 @@ do_store_am:
 #endif
 .endm
 
+.macro do_z80_flags_H
+#if EM_Z80
+       bmov    z_flags, ZFL_H, temp, AVR_H
+#endif
+.endm
+
 .macro do_z80_flags_set_N
 #if EM_Z80
        ori     z_flags, (1<<ZFL_N)       ; Negation auf 1
@@ -665,10 +725,10 @@ do_op_outa: ; out (opl),a
        printnewline
        printstring "Port write: "
        mov temp,z_a
-       rcall printhex
+       lcall printhex
        printstring " -> ("
        mov temp,opl
-       rcall printhex
+       lcall printhex
        printstring ") "
 .endif
        mov temp,z_a
@@ -682,21 +742,21 @@ do_op_outa: ; out (opl),a
 ;|IN A,[n]  |------|Input                |A=[n]                 |
 ;
 ;
-do_op_in:      ; in a,(opl)
+do_op_ina:                             ; in a,(opl)
 .if PORT_DEBUG
        printnewline
        printstring "Port read: ("
        mov temp,opl
-       rcall printhex
+       lcall printhex
        printstring ") -> "
 .endif
 
        mov temp2,opl
        lcall portRead
-       mov opl,temp
+       mov z_a,temp
 
 .if PORT_DEBUG
-       rcall printhex
+       lcall printhex
        printstring " "
 .endif
        ret
@@ -1021,9 +1081,11 @@ do_op_addhl:
        lds     temp2,z_h
        add opl,temp
        adc oph,temp2
+       sts     z_l,opl
+       sts     z_h,oph
        in temp,sreg
-       bmov    z_flags,ZFL_H, temp,AVR_H
        bmov    z_flags,ZFL_C, temp,AVR_C
+       do_z80_flags_H
        do_z80_flags_clear_N
        ret
 
@@ -1358,7 +1420,7 @@ do_op_ifnz:
        sbrs z_flags, ZFL_Z
        ret
        pop     temp                            ; nix tun
-       pop temp                                ; direkt zuruech zu main        
+       pop temp                                ; direkt zurueck zu main        
        ret
 
 ;----------------------------------------------------------------
@@ -1373,7 +1435,7 @@ do_op_ifz:
        sbrc z_flags, ZFL_Z
        ret
        pop     temp                            ; nix tun
-       pop temp                                ; direkt zuruech zu main        
+       pop temp                                ; direkt zurueck zu main        
        ret
 
 ;----------------------------------------------------------------
@@ -1484,7 +1546,7 @@ instr     do_fetch_B,     op_DEC,         do_store_B      ;05             ;DEC B
 instr  do_fetch_DIR8,  op_nop,         do_store_B      ;06             ;LD B,n
 instr  do_fetch_nop,   op_RLCA,        do_store_nop    ;07             ;RLCA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;08             ;EX AF,AF'
-instr  do_fetch_BC,    op_ADDHL,       do_store_HL     ;09             ;ADD HL,BC
+instr  do_fetch_BC,    op_ADDHL,       do_store_nop    ;09             ;ADD HL,BC
 instr  do_fetch_MBC,   op_nop,         do_store_nop    ;0A             ;LD A,(BC)
 instr  do_fetch_BC,    op_DEC16,       do_store_BC     ;0B             ;DEC BC
 instr  do_fetch_C,     op_INC,         do_store_C      ;0C             ;INC C
@@ -1500,7 +1562,7 @@ instr     do_fetch_D,     op_DEC,         do_store_D      ;15             ;DEC D
 instr  do_fetch_DIR8,  op_nop,         do_store_D      ;16 nn          ;LD D,n
 instr  do_fetch_nop,   op_RLA,         do_store_nop    ;17             ;RLA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;18 oo          ;JR o
-instr  do_fetch_DE,    op_ADDHL,       do_store_HL     ;19             ;ADD HL,DE
+instr  do_fetch_DE,    op_ADDHL,       do_store_nop    ;19             ;ADD HL,DE
 instr  do_fetch_MDE,   op_nop,         do_store_nop    ;1A             ;LD A,(DE)
 instr  do_fetch_DE,    op_DEC16,       do_store_DE     ;1B             ;DEC DE
 instr  do_fetch_E,     op_INC,         do_store_E      ;1C             ;INC E
@@ -1516,7 +1578,7 @@ instr     do_fetch_H,     op_DEC,         do_store_H      ;25             ;DEC H
 instr  do_fetch_DIR8,  op_nop,         do_store_H      ;26 nn          ;LD H,n
 instr  do_fetch_A,     op_DA,          do_store_A      ;27             ;DAA
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;28 oo          ;JR Z,o
-instr  do_fetch_HL,    op_ADDHL,       do_store_HL     ;29             ;ADD HL,HL
+instr  do_fetch_HL,    op_ADDHL,       do_store_nop    ;29             ;ADD HL,HL
 instr  do_fetch_DIR16, op_RMEM16,      do_store_HL     ;2A nn nn       ;LD HL,(nn)
 instr  do_fetch_HL,    op_DEC16,       do_store_HL     ;2B             ;DEC HL
 instr  do_fetch_L,     op_INC,         do_store_L      ;2C             ;INC L
@@ -1532,7 +1594,7 @@ instr     do_fetch_MHL,   op_DEC,         do_store_MHL    ;35             ;DEC (HL)
 instr  do_fetch_DIR8,  op_nop,         do_store_MHL    ;36 nn          ;LD (HL),n
 instr  do_fetch_nop,   op_SCF,         do_store_nop    ;37             ;SCF
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;38 oo          ;JR C,o
-instr  do_fetch_SP,    op_ADDHL,       do_store_HL     ;39             ;ADD HL,SP
+instr  do_fetch_SP,    op_ADDHL,       do_store_nop    ;39             ;ADD HL,SP
 instr  do_fetch_DIR16, op_RMEM8,       do_store_A      ;3A nn nn       ;LD A,(nn)
 instr  do_fetch_SP,    op_DEC16,       do_store_SP     ;3B             ;DEC SP
 instr  do_fetch_nop,   op_INCA,        do_store_nop    ;3C             ;INC A
@@ -1694,7 +1756,7 @@ instr     do_fetch_RST,   op_nop,         do_store_CALL   ;D7             ;RST 10H
 instr  do_fetch_nop,   op_IFC,         do_store_RET    ;D8             ;RET C
 instr  do_fetch_nop,   op_nop,         do_store_nop    ;D9             ;EXX
 instr  do_fetch_DIR16, op_IFC,         do_store_PC     ;DA nn nn       ;JP C,nn
-instr  do_fetch_DIR8,  op_IN,          do_store_A      ;DB nn          ;IN A,(n)
+instr  do_fetch_DIR8,  op_INA,         do_store_nop    ;DB nn          ;IN A,(n)
 instr  do_fetch_DIR16, op_IFC,         do_store_CALL   ;DC nn nn       ;CALL C,nn
 instr  do_fetch_nop,   op_INV,         do_store_nop    ;DD             ;(Z80 specific)
 instr  do_fetch_DIR8,  op_SBCFA,       do_store_nop    ;DE nn          ;SBC A,n
index 76c2e9d4442d1bb3096c67b884ae416c883571f5..5103f779ee11f5aaf75f625b94e7312b254d662e 100644 (file)
 ;      .include "mmc-old.asm"
 
 ; >>>-------------------------------------- Virtual Devices
-       .include "virt_ports.asm"               ; Virtual Ports for BIOS
+       .include "virt_ports.asm"       ; Virtual Ports for BIOS
 ; <<<-------------------------------------- Virtual Devices
 
 ; >>>-------------------------------------- File System Management
-       .include "dsk_fsys.asm"                 ; Basic Filesystem definitions
-       .include "dsk_mgr.asm"                  ; Disk- Manager
-       .include "dsk_cpm.asm"                  ; CPM- Disk Interaktion
-       .include "dsk_fat16.asm"                ; FAT16-DISK Interaktion
-       .include "dsk_ram.asm"                  ; RAM- Disk Interaktion
+       .include "dsk_fsys.asm"         ; Basic Filesystem definitions
+       .include "dsk_mgr.asm"          ; Disk- Manager
+       .include "dsk_cpm.asm"          ; CPM- Disk Interaktion
+       .include "dsk_fat16.asm"        ; FAT16-DISK Interaktion
+       .include "dsk_ram.asm"          ; RAM- Disk Interaktion
 ; <<<-------------------------------------- File System Management
-;      .include "z80int.asm"           ;Old 8080 interpreter.
+;      .include "8080int-orig.asm"     ;Old 8080 interpreter.
 ;      .include "8080int.asm"          ;New 8080 interpreter.
 ;      .include "8080int-t3.asm"       ;Another 8080 interpreter
 ;      .include "8080int-t3-jmp.asm"   ;Can't get enough