51 lines
4.0 KiB
Plaintext
51 lines
4.0 KiB
Plaintext
1 .module wc_prsrw_attr
|
|
2 .area _CODE
|
|
00006006 3 WC_ENTRY = 0x6006
|
|
4 .globl _wc_prsrw_attr
|
|
00000000 5 _wc_prsrw_attr::
|
|
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
|
|
11
|
|
12 ; ── вызов #03 (prsrw) ──────────────────────────────────
|
|
0000000A DD 46 0B [19] 13 ld b, 11(ix) ; B = len_hi
|
|
0000000D DD 4E 0A [19] 14 ld c, 10(ix) ; C = len_lo
|
|
00000010 DD 56 08 [19] 15 ld d, 8(ix) ; D = y
|
|
00000013 DD 5E 09 [19] 16 ld e, 9(ix) ; E = x
|
|
00000016 DD 6E 00 [19] 17 ld l, 0(ix)
|
|
00000019 DD 66 01 [19] 18 ld h, 1(ix) ; HL = str
|
|
0000001C D9 [ 4] 19 exx
|
|
0000001D DD 6E 02 [19] 20 ld l, 2(ix)
|
|
00000020 DD 66 03 [19] 21 ld h, 3(ix) ; HL = win
|
|
00000023 DD 7E 0C [19] 22 ld a, 12(ix) ; A = attr (IX всё ещё → фрейм)
|
|
00000026 F5 [11] 23 push af ; сохраняем attr на стеке
|
|
00000027 E5 [11] 24 push hl
|
|
00000028 DD E1 [14] 25 pop ix ; IX = win
|
|
0000002A D9 [ 4] 26 exx ; BC=len, DE=y|x, HL=str; HL'=win
|
|
0000002B 3E 03 [ 7] 27 ld a, #0x03
|
|
0000002D CD 06 60 [17] 28 call WC_ENTRY
|
|
29
|
|
30 ; ── вызов #04 (priat) ──────────────────────────────────
|
|
00000030 F1 [10] 31 pop af ; A = attr
|
|
00000031 08 [ 4] 32 ex af, af' ; A' = attr
|
|
00000032 D9 [ 4] 33 exx ; HL = win (из HL'), BC=len, DE=y|x
|
|
00000033 E5 [11] 34 push hl
|
|
00000034 DD E1 [14] 35 pop ix ; IX = win
|
|
00000036 D9 [ 4] 36 exx ; restore BC=len, DE=y|x
|
|
00000037 3E 04 [ 7] 37 ld a, #0x04
|
|
00000039 CD 06 60 [17] 38 call WC_ENTRY
|
|
39
|
|
0000003C D1 [10] 40 pop de ; remove saved str
|
|
0000003D E1 [10] 41 pop hl ; remove saved win
|
|
0000003E DD E1 [14] 42 pop ix ; restore caller IX
|
|
43 ; callee cleans 5 bytes: y(1)+x(1)+len(2)+attr(1)
|
|
00000040 E1 [10] 44 pop hl ; HL = return address
|
|
00000041 33 [ 6] 45 inc sp
|
|
00000042 33 [ 6] 46 inc sp
|
|
00000043 33 [ 6] 47 inc sp
|
|
00000044 33 [ 6] 48 inc sp
|
|
00000045 33 [ 6] 49 inc sp
|
|
00000046 E9 [ 4] 50 jp (hl)
|