From 9903415637fdb0ad9965e03f401fbd1447651dc8 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 21 Mar 2012 19:23:51 +0000 Subject: [PATCH 1/1] * avr/Z80int-jmp.asm - INI, INIR, IND, INDR, OUTI, OTIR, OUTD, OUTDR added. git-svn-id: svn://cu.loc/avr-cpm/avrcpm/trunk@185 57430480-672e-4586-8877-bcf8adbbf3b7 --- avr/Z80int-jmp.asm | 128 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 117 insertions(+), 11 deletions(-) diff --git a/avr/Z80int-jmp.asm b/avr/Z80int-jmp.asm index b73de8f..6641a92 100644 --- a/avr/Z80int-jmp.asm +++ b/avr/Z80int-jmp.asm @@ -1451,7 +1451,7 @@ do_op_rmem8: #if 1 -do_op_da: +do_op_daa: #if EM_Z80 sbrc z_flags,ZFL_N ;if add-op @@ -1491,7 +1491,7 @@ op_da_a13: ; #if EM_Z80 op_da_sub: ;else (sub-op) - rcall do_op_inv ; TODO: ! Z80 DAA whith N flag set. + rjmp op_da_add ; TODO: ! Z80 DAA whith N flag set. ret ;endif #endif @@ -1981,7 +1981,7 @@ instr fetch_HL, op_INC16, store_HL ;23 ;INC HL instr fetch_H, op_INC, store_H ;24 ;INC H instr fetch_H, op_DEC, store_H ;25 ;DEC H instr fetch_DIR8, op_nop, store_H ;26 nn ;LD H,n -instr fetch_A, op_DA, store_A ;27 ;DAA +instr fetch_A, op_DAA, store_A ;27 ;DAA instr fetch_DIR8, op_IFZ, store_pcrel ;28 oo ;JR Z,o instr fetch_HL, op_ADDHL, store_nop ;29 ;ADD HL,HL instr fetch_DIR16, op_RMEM16, store_HL ;2A nn nn ;LD HL,(nn) @@ -2795,6 +2795,112 @@ do_op_CPDR: sbiw z_pcl,2 ret +;---------------------------------------------------------------- +;|Mnemonic |SZHPNC|Description |Notes | +;---------------------------------------------------------------- +;|INI |?*??1-|Input and Increment |[HL]=[C],HL=HL+1,B=B-1| +;|IND |?*??1-|Input and Decrement |[HL]=[C],HL=HL-1,B=B-1| +;|INIR |?1??1-|Input, Inc., Repeat |INI till B=0 | +;|INDR |?1??1-|Input, Dec., Repeat |IND till B=0 | + +op_INxx_common: + cbr z_flags,(1<