-cmd_R:\r
- ld hl,0\r
- call get_lastarg_def\r
-read_file:\r
- ld de,dfcb1+1\r
- ld a,(de)\r
- cp '?'\r
- jr z,read_symfile\r
- dec de\r
- push hl\r
- ld hl,0\r
- ld (high_load),hl\r
- call file_open\r
- ld hl,dfcb1+9\r
- ld de,str_hex\r
- ld b,3\r
- call strncmp\r
- pop hl\r
- jr z,read_hexfile\r
- ld de,TPA\r
- push hl\r
- add hl,de\r
-l108eh:\r
- call read_sector\r
- jr nz,read_file_nxt\r
- pop hl\r
- jr read_symfile\r
-\r
-read_file_nxt:\r
- ld de,DMA_BUF\r
- ld b,080h\r
-l109ah:\r
- ld a,(de)\r
- call cmdR_storebyte\r
- inc de\r
- inc hl\r
- djnz l109ah\r
- jr l108eh\r
-\r
-read_hexfile:\r
- push hl\r
-l10aeh:\r
- call read_byte ; RECORD MARK\r
- jr z,rdhex_done\r
- cp ':'\r
- jr nz,l10aeh\r
- ld c,0\r
- call read_hexchar ; RECLEN\r
- ld b,a\r
- call read_hexchar ; LOAD ADDR H\r
- ld h,a\r
- call read_hexchar ; LOAD ADDR L\r
- ld l,a\r
- ld a,b\r
- and a\r
- jr z,rdhex_done\r
- call read_hexchar ; RECTYP\r
-l10cch:\r
- call read_hexchar ; DATA\r
- pop de\r
- push de\r
- push hl\r
- add hl,de\r
- call cmdR_storebyte\r
- pop hl\r
- inc hl\r
- djnz l10cch\r
- call read_hexchar ; CHKSUM\r
- ld a,c\r
- and a\r
- jr nz,error3\r
- jr l10aeh\r
-rdhex_done:\r
- pop hl\r
- jr read_symfile\r
-\r
-read_symfile:\r
- ld de,fcbsym+1\r
- ld a,(de)\r
- cp ' '\r
- jp z,p_max_high\r
-\r
- push hl ; offset\r
- call pstr_inl\r
- db 'SYMBOLS',CR,LF+80h\r
-\r
- dec de\r
- call file_open\r
-rs_1:\r
- call read_byte\r
-rs_2:\r
- pop de ; offset\r
- cp 1ah\r
- jp z,p_max_high\r
- push de ; offset\r
- cp '!'\r
- jr c,rs_1\r
- call read_hexbyte0 ; symval H\r
- ld h,a\r
- call read_hexbyte ; symval L\r
- ld l,a\r
- add hl,de\r
- call read_byte\r
- cp ' '\r
- jr z,rs_4\r
-rs_3: call read_byte\r
- cp ' '\r
- jr nc,rs_3\r
- jr rs_2\r
-\r
-rs_4:\r
- push hl ; symval\r
- ld hl,(BDOS+1) ;\r
- ld b,0 ; setup symlen\r
-rs_5:\r
- dec hl ;\r
- call read_byte ; next char of symbol name\r
- call test_sym_char ; valid char?\r
- jr nz,rs_6\r
- ld (hl),a ;\r
- inc b ; symlen++\r
- ld a,b ;\r
- cp 10h+1 ;\r
- jr c,rs_5 ;\r
-error3:\r
- jp ERROR ;\r
-\r
-rs_6:\r
- call test_symterm_ch\r
- jr nz,error3\r
-\r
- push bc ; symlen\r
- ex de,hl ;\r
- ld hl,(BDOS+1) ;\r
- inc hl ;\r
- ld c,(hl) ;\r
- inc hl ;\r
- ld b,(hl) ;\r
- ex de,hl\r
- ld (hl),b ;\r
- dec hl ;\r
- ld (hl),c ;\r
- dec hl ;\r
- ld (hl),0c3h ;\r
-\r
- ld de,(max_load) ;\r
- call cp_hl_de ;\r
- jr c,error3 ;\r
- ld de,(reg_sp) ;\r
- call cp_hl_de ;\r
- jr nc,rs_61 ;\r
- ld (reg_sp),hl ;\r
-rs_61:\r
- ld de,(BDOS+1) ;\r
- ld (BDOS+1),hl ;\r
- ex de,hl ;\r
- pop af ; symlen\r
- ld (hl),a ;\r
- inc hl ;\r
- pop de ; symval\r
- ld (hl),e ;\r
- inc hl ;\r
- ld (hl),d ;\r
- ld hl,symlen_max ;\r
- cp (hl) ; new max?\r
- jr c,$+3 ;\r
- ld (hl),a ;\r
- jp rs_1 ;\r
-\r
-\r
-; test for valid character for symbols\r
-; return z if valid\r
-\r
-test_sym_char:\r
- cp '$'\r
- ret z\r
- cp '%'\r
- ret z\r
- cp '.'\r
- ret z\r
- cp '_'\r
- ret z\r
- call test_alphanum\r
- ret c ; cy == 1 --> z == 0\r
- cp a ; return z\r
- ret\r
-\r
-\r
-; check if char is in [0..9,?,@,A..Z,a..z]\r
-; return cy if invalid\r
-; return nc if valid alfanumeric char\r
-\r
-test_alphanum:\r
- cp 'z'+1\r
- ccf\r
- ret c\r
- cp 'a'\r
- ret nc\r
- cp 'Z'+1\r
- ccf\r
- ret c\r
- cp '?'\r
- ret nc\r
-test_numeral:\r
- cp '9'+1\r
- ccf\r
- ret c\r
- cp '0'\r
- ret\r
-\r
-test_symterm_ch:\r
- cp CR\r
- ret z\r
- cp LF\r
- ret z\r
-test_whitespace:\r
- cp ' '\r
- ret z\r
- cp TAB\r
- ret\r
-\r
-p_max_high0:\r
- call assert_eol\r
-p_max_high:\r
- call pstr_inl\r
- DC 'High = '\r
- ld hl,(high_load)\r
- call out_hl\r
- call pstr_inl\r
- DC ' Max = '\r
- ld hl,(max_load)\r
- call out_hl\r
- call pstr_inl\r
- DC ' Top = '\r
- ld hl,(BDOS+1)\r
- call out_hl\r
- jp crlf\r
-\r
-cmd_W:\r
- call get_arg_range\r
- call assert_eol\r
- push hl\r
- ld a,c\r
- add a,07fh\r
- jr nc,l11adh\r
- inc b\r
-l11adh:\r
- and 080h\r
- ld c,a\r
- push bc\r
- ld a,(dfcb1+1)\r
- cp ' '\r
- jr z,error4\r
- ld de,dfcb1\r
- call setup_fcb\r
- push de\r
- ld c,BDOS_DELETE\r
- call ddtz_bdos\r
- pop de\r
- ld c,BDOS_CREATE\r
- call ddtz_bdos\r
- inc a\r
- jr z,error4\r
- pop bc\r
- pop hl\r
-l11cch:\r
- ld a,b\r
- or c\r
- jr z,close_file\r
- push bc\r
- ld de,080h ; DMA_BUF\r
- ld b,d\r
- ld c,e\r
- ldir\r
- call write_sector\r
- ex (sp),hl\r
- ld bc,0ff80h\r
- add hl,bc\r
- ex (sp),hl\r
- pop bc\r
- jr l11cch\r
-\r
-write_sector:\r
- push hl\r
- ld de,dfcb1\r
- ld c,BDOS_WRITE\r
- call ddtz_bdos\r
- pop hl\r
- and a\r
- ret z\r
- call close_file\r
-error4:\r
- jp ERROR\r
-\r
-close_file:\r
- ld de,dfcb1\r
- ld c,BDOS_CLOSE\r
- jp ddtz_bdos\r
-\r
-cmd_A:\r
- ld hl,(last_A)\r
- call get_lastarg_def\r
- push hl\r
- pop iy\r
- ld hl,l1259h\r
- ld (error_func),hl\r
- ld (l1262h),sp\r
-l1211h:\r
- push iy\r
- pop hl\r
- ld (last_A),hl\r
- ld (var.$),hl\r
- push hl\r
- call p_disas_line\r
- pop iy\r
- ld de,(var.@)\r
- ld a,d\r
- or e\r
- ld c,17\r
- jr z,l122dh\r
- ld c,25\r
-l122dh:\r
- call p_fill_space\r
- ld c,b\r
- push bc\r
- call get_line\r
- pop bc\r
- call skipbl\r
- cp '.'\r
- ret z\r
- cp '-'\r
- jr nz,l124bh\r
- ld iy,(cmd_A_prev)\r
- jr l1211h\r
-l124bh:\r
- and a\r
- call nz,sub_1268h\r
- ld (cmd_A_prev),iy\r
- ld b,0\r
- add iy,bc\r
- jr l1211h\r
-\r
-l1259h:\r
- call l0146h\r
- ld sp,(l1262h)\r
- jr l1211h\r
-\r
-sub_1268h:\r
- call skipbl\r
- ld hl,t_MNEMONICS\r
- call sub_030ah\r
- jp nc,ERROR\r
- call skipbl\r
- push de\r
- ld a,b\r
- add a,b\r
- add a,b\r
- ld hl,b_1289_start\r
- call add_hl_a\r
- ld e,(hl)\r
- inc hl\r
- ld d,(hl)\r
- inc hl\r
- ld b,(hl)\r
- ex de,hl\r
- pop de\r
-\r
-CALL_HL:\r
- jp (hl)\r
-\r
-b_1289_start:\r
- dw as.ADC_SBC ;ADC\r
- db 088h ;\r
- dw as.ADD ;ADD\r
- db 080h ;\r
- dw as.AND_CP_OR_SUB_XOR ;AND\r
- db 0a0h ;\r
- dw as.BITOP ;BIT\r
- db 040h ;\r
- dw as.CALL ;CALL\r
- db 0c4h ;\r
- dw as.opc.noarg ;CCF\r
- db 03fh ;\r
- dw as.AND_CP_OR_SUB_XOR ;CP\r
- db 0b8h ;\r
- dw gen.opc.ED2 ;CPD\r
- db 0a9h ;\r
- dw gen.opc.ED2 ;CPDR\r
- db 0b9h ;\r
- dw gen.opc.ED2 ;CPI\r
- db 0a1h ;\r
- dw gen.opc.ED2 ;CPIR\r
- db 0b1h ;\r
- dw as.opc.noarg ;CPL\r
- db 02fh ;\r
- dw as.opc.noarg ;DAA\r
- db 027h ;\r
- dw as.DEC_INC ;DEC\r
- db 005h ;\r
- dw as.opc.noarg ;DI\r
- db 0f3h ;\r
- dw as.DJNZ ;DJNZ\r
- db 010h ;\r
- dw as.opc.noarg ;EI\r
- db 0fbh ;\r
- dw as.EX ;EX\r
- db 0e3h ;\r
- dw as.opc.noarg ;EXX\r
- db 0d9h ;\r
- dw as.opc.noarg ;HALT\r
- db 076h ;\r
- dw as.IM ;IM\r
- db 046h ;\r
- dw as.IN ;IN\r
- db 040h ;\r
- dw as.DEC_INC ;INC\r
- db 004h ;\r
- dw gen.opc.ED2 ;IND\r
- db 0aah ;\r
- dw gen.opc.ED2 ;INDR\r
- db 0bah ;\r
- dw gen.opc.ED2 ;INI\r
- db 0a2h ;\r
- dw gen.opc.ED2 ;INIR\r
- db 0b2h ;\r
- dw as.JP ;JP\r
- db 0c2h ;\r
- dw as.JR ;JR\r
- db 020h ;\r
- dw as.LD ;LD\r
- db 040h ;\r
- dw gen.opc.ED2 ;LDD\r
- db 0a8h ;\r
- dw gen.opc.ED2 ;LDDR\r
- db 0b8h ;\r
- dw gen.opc.ED2 ;LDI\r
- db 0a0h ;\r
- dw gen.opc.ED2 ;LDIR\r
- db 0b0h ;\r
- dw gen.opc.ED2 ;NEG\r
- db 044h ;\r
- dw as.opc.noarg ;NOP\r
- db 000h ;\r
- dw as.AND_CP_OR_SUB_XOR ;OR\r
- db 0b0h ;\r
- dw gen.opc.ED2 ;OTDR\r
- db 0bbh ;\r
- dw gen.opc.ED2 ;OTIR\r
- db 0b3h ;\r
- dw as.OUT ;OUT\r
- db 041h ;\r
- dw gen.opc.ED2 ;OUTD\r
- db 0abh ;\r
- dw gen.opc.ED2 ;OUTI\r
- db 0a3h ;\r
- dw as.POP_PUSH ;POP\r
- db 0c1h ;\r
- dw as.POP_PUSH ;PUSH\r
- db 0c5h ;\r
- dw as.BITOP ;RES\r
- db 080h ;\r
- dw as.RET ;RET\r
- db 0c0h ;\r
- dw gen.opc.ED2 ;RETI\r
- db 04dh ;\r
- dw gen.opc.ED2 ;RETN\r
- db 045h ;\r
- dw as.SHIFTOP ;RL\r
- db 010h ;\r
- dw as.opc.noarg ;RLA\r
- db 017h ;\r
- dw as.SHIFTOP ;RLC\r
- db 000h ;\r
- dw as.opc.noarg ;RLCA\r
- db 007h ;\r
- dw gen.opc.ED2 ;RLD\r
- db 06fh ;\r
- dw as.SHIFTOP ;RR\r
- db 018h ;\r
- dw as.opc.noarg ;RRA\r
- db 01fh ;\r
- dw as.SHIFTOP ;RRC\r
- db 008h ;\r
- dw as.opc.noarg ;RRCA\r
- db 00fh ;\r
- dw gen.opc.ED2 ;RRD\r
- db 067h ;\r
- dw as.RST ;RST\r
- db 0c7h ;\r
- dw as.ADC_SBC ;SBC\r
- db 098h ;\r
- dw as.opc.noarg ;SCF\r
- db 037h ;\r
- dw as.BITOP ;SET\r
- db 0c0h ;\r
- dw as.SHIFTOP ;SLA\r
- db 020h ;\r
- dw as.SHIFTOP ;SRA\r
- db 028h ;\r
- dw as.SHIFTOP ;SRL\r
- db 038h ;\r
- dw as.AND_CP_OR_SUB_XOR ;SUB\r
- db 090h ;\r
- dw as.AND_CP_OR_SUB_XOR ;XOR\r
- db 0a8h ;\r
-\r
- dw as.IN0 ;IN0\r
- db 000h ;\r
- dw as.MLT ;MLT\r
- db 04ch ;\r
- dw gen.opc.ED2 ;OTDM\r
- db 08bh ;\r
- dw gen.opc.ED2 ;OTDMR\r
- db 09bh ;\r
- dw gen.opc.ED2 ;OTIM\r
- db 083h ;\r
- dw gen.opc.ED2 ;OTIMR\r
- db 093h ;\r
- dw as.OUTO ;OUT0\r
- db 001h ;\r
- dw gen.opc.ED2 ;SLP\r
- db 076h ;\r
- dw as.TST ;TST\r
- db 004h ;\r
- dw as.TSTIO ;TSTIO\r
- db 074h ;\r
-\r
-as.TST:\r
- call arg.r_HL_A ;\r
- jr nc,as.tst_0\r
- rlca\r
- rlca\r
- rlca\r
- add a,b\r
- ld b,a\r
- jp gen.opc.ED2\r
-as.tst_0:\r
- ld b,064h\r
-as.TSTIO:\r
- call arg.imm_8bit ;\r
- jr as.store_io0\r
-\r
-as.IN0:\r
- call arg.r_HL_A ;\r
- jr nc,error5\r
- cp 006h\r
- jr z,error5\r
- rlca\r
- rlca\r
- rlca\r
- add a,b\r
- ld b,a\r
- call assert_comma ;\r
- call arg.addr_8bit ;\r
- jr as.store_io0\r
-\r
-as.OUTO:\r
- call arg.addr_8bit ;\r
- call assert_comma ;\r
- call arg.r_HL_A ;\r
- jr nc,error5\r
- cp 006h\r
- jr z,error5\r
- rlca\r
- rlca\r
- rlca\r
- add a,b\r
- ld b,a\r
-\r
-as.store_io0:\r
- call assert_eol\r
- ld (iy+000h),0edh\r
- ld (iy+001h),b\r
- ld (iy+002h),l\r
- ld c,003h\r
- ret\r
-\r
-as.MLT:\r
- call arg.ww ;\r
- jr nc,error5\r
- add a,b\r
- ld b,a\r
- jp gen.opc.ED2\r
-\r
-error5:\r
- jp ERROR\r
-\r
-as.LD:\r
- call arg.r_HL_A\r
- jr c,l13d4h\r
- call arg.IDX_displcmnt\r
- jp c,l1471h\r
- call arg.ww\r
- jp c,l149ch\r
- call arg.IX_IY\r
- jp c,l14f5h\r
- ld a,(de)\r
- cp 'I'\r
- jp z,l1511h\r
- cp 'R'\r
- jp z,l1519h\r
- cp '('\r
- jp nz,ERROR\r
- inc de\r
- call arg.ww\r
- jp c,l1528h\r
- call test_expr\r
- call test_paren_close\r
- call assert_comma\r
- call arg.ww\r
- jr c,l13c2h\r
- call arg.IX_IY\r
- jr nc,l13aah\r
- ld b,022h\r
-l1395h:\r
- call assert_eol\r
- ld a,(prefix_ixiy)\r
-l139bh:\r
- ld (iy+000h),a\r
- ld (iy+001h),b\r
- ld (iy+002h),l\r
- ld (iy+003h),h\r
- ld c,004h\r
- ret\r
-l13aah:\r
- ld a,(de)\r
- cp 'A'\r
- jp nz,ERROR\r
- inc de\r
- ld b,032h\r
-as.store_3:\r
- call assert_eol\r
- ld (iy+000h),b\r
- ld (iy+001h),l\r
- ld (iy+002h),h\r
- ld c,003h\r
- ret\r
-l13c2h:\r
- cp 020h\r
- jr z,l13d0h\r
- add a,043h\r
- ld b,a\r
-l13c9h:\r
- call assert_eol\r
- ld a,0edh\r
- jr l139bh\r
-l13d0h:\r
- ld b,022h\r
- jr as.store_3\r
-l13d4h:\r
- ld b,a\r
- call assert_comma\r
- call arg.r_HL_A\r
- jr nc,l13f0h\r
- push af\r
- ld a,b\r
- rlca\r
- rlca\r
- rlca\r
- ld b,a\r
- pop af\r
- add a,b\r
- add a,040h\r
- cp 076h\r
- jp z,ERROR\r
-l13ech:\r
- ld b,a\r
- jp as.opc.noarg\r
-l13f0h:\r
- call arg.IDX_displcmnt\r
- jr nc,l1413h\r
- ld a,b\r
- rlca\r
- rlca\r
- rlca\r
- add a,046h\r
- cp 076h\r
- jp z,ERROR\r
-\r
-l1400h:\r
- ld b,a\r
- call assert_eol\r
- ld (iy+001h),b\r
- ld (iy+002h),c\r
- ld a,(prefix_ixiy)\r
- ld (iy+000h),a\r
- ld c,003h\r
- ret\r
-l1413h:\r
- ld a,(de)\r
- cp 'I'\r
- jr z,l1426h\r
- cp 'R'\r
- jr nz,l1432h\r
- ld a,b\r
- cp 007h\r
- jp nz,ERROR\r
- ld b,05fh\r
- jr l142eh\r
-l1426h:\r
- ld a,b\r
- cp 007h\r
- jp nz,ERROR\r
- ld b,057h\r
-l142eh:\r
- inc de\r
- jp gen.opc.ED2\r
-l1432h:\r
- cp '('\r
- jr z,l144ch\r
- call arg.imm_8bit\r
- ld a,b\r
- rlca\r
- rlca\r
- rlca\r
- add a,006h\r
-l143fh:\r
- ld b,a\r
-as.store_2:\r
- call assert_eol\r
- ld (iy+000h),b\r
- ld (iy+001h),l\r
- ld c,002h\r
- ret\r
-l144ch:\r
- inc de\r
- ld a,b\r
- cp 007h\r
- jp nz,ERROR\r
- call arg.ww\r
- jr nc,l1466h\r
- cp 030h\r
- jp nc,ERROR\r
- add a,00ah\r
- ld b,a\r
- call test_paren_close\r
- jp as.opc.noarg\r
-l1466h:\r
- call test_expr\r
- call test_paren_close\r
- ld b,03ah\r
- jp as.store_3\r
-\r
-l1471h:\r
- call assert_comma\r
- call arg.r_HL_A\r
- jr nc,l1483h\r
- cp 006h\r
- jp z,ERROR\r
- add a,070h\r
- jp l1400h\r
-\r
-l1483h:\r
- call arg.imm_8bit\r
- call assert_eol\r
- ld a,(prefix_ixiy)\r
- ld (iy+000h),a\r
- ld (iy+001h),036h\r
- ld (iy+002h),c\r
- ld (iy+003h),l\r
- ld c,004h\r
- ret\r
-l149ch:\r
- ld b,a\r
- call assert_comma\r
- ld hl,t_HL.AF\r
- call sub_0318h\r
- jr c,l14c3h\r
- call arg.IX_IY\r
- jr nc,l14cch\r
- ld a,b\r
- cp 030h\r
- jr nz,error6\r
- ld b,0f9h\r
-l14b4h:\r
- call assert_eol\r
- ld a,(prefix_ixiy)\r
- ld (iy+000h),a\r
- ld (iy+001h),b\r
- ld c,002h\r
- ret\r
-l14c3h:\r
- ld a,b\r
- cp 030h\r
- jr nz,error6\r
- ld b,0f9h\r
- jr as.opc.noarg ;14ca\r
-l14cch:\r
- ld a,(de)\r
- cp '('\r
- jr nz,l14e8h\r
- inc de\r
- call test_expr\r
- call test_paren_close\r
- ld a,b\r
- cp 020h\r
- jr z,l14e3h\r
- add a,04bh\r
- ld b,a\r
- jp l13c9h\r
-l14e3h:\r
- ld b,02ah\r
- jp as.store_3\r
-l14e8h:\r
- call test_expr\r
- call assert_eol\r
- ld a,001h\r
- add a,b\r
- ld b,a\r
- jp as.store_3\r
-l14f5h:\r
- call assert_comma\r
- ld a,(de)\r
- cp '('\r
- jr nz,l1509h\r
- inc de\r
- call test_expr\r
- call test_paren_close\r
- ld b,02ah\r
- jp l1395h\r
-l1509h:\r
- call test_expr\r
- ld b,021h\r
- jp l1395h\r
-l1511h:\r
- inc de\r
- call assert_comma\r
- ld b,047h\r
- jr l151fh\r
-l1519h:\r
- inc de\r
- call assert_comma\r
- ld b,04fh\r
-l151fh:\r
- ld a,(de)\r
- inc de\r
- cp 'A'\r
- jr z,gen.opc.ED2\r
-error6:\r
- jp ERROR\r
-\r
-l1528h:\r
- cp 020h\r
- jr nc,error6\r
- add a,002h\r
- ld b,a\r
- call test_paren_close\r
- call assert_comma\r
- ld a,(de)\r
- cp 'A'\r
- jr nz,error6\r
- inc de\r
-as.opc.noarg:\r
- call assert_eol\r
- ld (iy+000h),b\r
- ld c,001h\r
- ret\r
-\r
-gen.opc.ED2:\r
- call assert_eol\r
- ld (iy+000h),0edh\r
- ld (iy+001h),b\r
- ld c,002h\r
- ret\r
-\r
-as.ADC_SBC:\r
- ld hl,t_HL.AF\r
- call sub_0318h\r
- jr nc,as.AND_CP_OR_SUB_XOR\r
- call assert_comma\r
- call arg.ww\r
- jp nc,ERROR\r
- push af\r
- ld a,b\r
- cp 088h\r
- ld b,04ah\r
- jr z,l156ch\r
- ld b,042h\r
-l156ch:\r
- pop af\r
- add a,b\r
-l156eh:\r
- ld b,a\r
- jr gen.opc.ED2\r
-as.ADD:\r
- ld hl,t_HL.AF\r
- call sub_0318h\r
- jr c,l159ah\r
- call arg.IX_IY\r
- jr nc,as.AND_CP_OR_SUB_XOR\r
- call assert_comma\r
- ld hl,t_BC.DE.IX.SP\r
- ld a,(prefix_ixiy)\r
- cp 0fdh\r
- jr nz,l158eh\r
- ld hl,t_BC.DE.IY.SP\r
-l158eh:\r
- call arg.reg_16bit\r
- jp nc,ERROR\r
- add a,009h\r
-l1596h:\r
- ld b,a\r
- jp l14b4h\r
-l159ah:\r
- call assert_comma\r
- call arg.ww\r
- jp nc,ERROR\r
- add a,009h\r
- jp l13ech\r
-as.AND_CP_OR_SUB_XOR:\r
- ld a,(de)\r
- cp 'A'\r
- jr nz,l15b8h\r
- push de\r
- inc de\r
- call next_arg\r
- jr z,l15b7h\r
- pop de\r
- jr l15b8h\r
-l15b7h:\r
- pop af\r
-l15b8h:\r
- call arg.r_HL_A\r
- jr c,l15cbh\r
- call arg.IDX_displcmnt\r
- jr c,l15cfh\r
- call arg.imm_8bit\r
- ld a,b\r
- add a,046h\r
- jp l143fh\r
-l15cbh:\r
- add a,b\r
- jp l13ech\r
-l15cfh:\r
- ld a,b\r
- add a,006h\r
- jp l1400h\r
-\r
-as.SHIFTOP:\r
- call arg.r_HL_A\r
- jr c,l15fah\r
- call arg.IDX_displcmnt\r
- jp nc,ERROR\r
- ld a,b\r
- add a,006h\r
- ld b,a\r
-l15e4h:\r
- call assert_eol\r
- ld a,(prefix_ixiy)\r
- ld (iy+000h),a\r
- ld (iy+001h),0cbh\r
- ld (iy+002h),c\r
- ld (iy+003h),b\r
- ld c,004h\r
- ret\r
-\r
-l15fah:\r
- add a,b\r
-l15fbh:\r
- ld b,a\r
- call assert_eol\r
- ld (iy+001h),b\r
- ld (iy+000h),0cbh\r
- ld c,002h\r
- ret\r
-\r
-as.BITOP:\r
- call arg.bit\r
- call assert_comma\r
- call arg.r_HL_A\r
- jr c,l1624h\r
- call arg.IDX_displcmnt\r
- jp nc,ERROR\r
- ld a,l\r
- rlca\r
- rlca\r
- rlca\r
- add a,006h\r
- add a,b\r
- ld b,a\r
- jr l15e4h\r
-l1624h:\r
- add a,b\r
- ld b,a\r
- ld a,l\r
- rlca\r
- rlca\r
- rlca\r
- add a,b\r
- jr l15fbh\r
-\r
-as.CALL:\r
- push de\r
- call arg.cc_ZCPS\r
- jr nc,l163ch\r
- add a,b\r
- ld b,a\r
- call next_arg\r
- jr z,l163eh\r
- pop de\r
- push de\r
-l163ch:\r
- ld b,0cdh\r
-l163eh:\r
- pop af\r
- call test_expr\r
- jp as.store_3\r
-\r
-as.RET:\r
- call arg.cc_ZCPS\r
- jr nc,l164eh\r
- add a,b\r
- ld b,a\r
- jr l1650h\r
-l164eh:\r
- ld b,0c9h\r
-l1650h:\r
- jp as.opc.noarg\r
-\r
-as.JP:\r
- push de\r
- call arg.cc_ZCPS\r
- jr c,l1666h\r
-l1659h:\r
- pop de\r
- ld hl,l168ch\r
- call sub_030ah\r
- jr c,l1674h\r
- ld b,0c3h\r
- jr l166eh\r
-\r
-l1666h:\r
- add a,b\r
- ld b,a\r
- call next_arg\r
- jr nz,l1659h\r
- pop af\r
-l166eh:\r
- call test_expr\r
- jp as.store_3\r
-l1674h:\r
- call assert_eol\r
- ld a,b\r
- and a\r
- jr nz,l1680h\r
- ld b,0e9h\r
- jp as.opc.noarg\r
-l1680h:\r
- ld b,0ddh\r
- dec a\r
- jr z,l1687h\r
- ld b,0fdh\r
-l1687h:\r
- ld l,0e9h\r
- jp as.store_2\r
-\r
-l168ch:\r
- DC '(HL)'\r
- DC '(IX)'\r
- DC '(IY)'\r
- DB 0\r