Files

35 lines
2.5 KiB
Plaintext

1 .module wc_prsrw
2 .area _CODE
00006006 3 WC_ENTRY = 0x6006
4 .globl _wc_prsrw
00000000 5 _wc_prsrw::
00000000 DD E5 [15] 6 push ix
00000002 E5 [11] 7 push hl ; save win (HL = 1st arg)
00000003 D5 [11] 8 push de ; save str (DE = 2nd arg)
00000004 DD 21 00 00 [14] 9 ld ix, #0
00000008 DD 39 [15] 10 add ix, sp
0000000A DD 46 0B [19] 11 ld b, 11(ix) ; B = len_hi
0000000D DD 4E 0A [19] 12 ld c, 10(ix) ; C = len_lo
00000010 DD 56 08 [19] 13 ld d, 8(ix) ; D = y
00000013 DD 5E 09 [19] 14 ld e, 9(ix) ; E = x
00000016 DD 6E 00 [19] 15 ld l, 0(ix)
00000019 DD 66 01 [19] 16 ld h, 1(ix) ; HL = str
0000001C D9 [ 4] 17 exx
0000001D DD 6E 02 [19] 18 ld l, 2(ix)
00000020 DD 66 03 [19] 19 ld h, 3(ix) ; HL = win
00000023 E5 [11] 20 push hl
00000024 DD E1 [14] 21 pop ix ; IX = win
00000026 D9 [ 4] 22 exx ; BC=len, DE=y|x, HL=str
00000027 3E 03 [ 7] 23 ld a, #0x03
00000029 CD 06 60 [17] 24 call WC_ENTRY
0000002C D1 [10] 25 pop de ; remove saved str
0000002D E1 [10] 26 pop hl ; remove saved win
0000002E DD E1 [14] 27 pop ix ; restore caller IX
28 ; callee cleans: y(1)+x(1)+len(2) = 4 bytes
00000030 E1 [10] 29 pop hl ; HL = return address
00000031 33 [ 6] 30 inc sp
00000032 33 [ 6] 31 inc sp
00000033 33 [ 6] 32 inc sp
00000034 33 [ 6] 33 inc sp
00000035 E9 [ 4] 34 jp (hl)