From 79db80bb098dfbccae073032ddf469e1918a882d Mon Sep 17 00:00:00 2001 From: nmlgc Date: Sun, 31 Aug 2014 07:26:45 +0200 Subject: [PATCH] [Reduction] #394: graph_pack_put_8 --- libs/master.lib/graph_pack_put_8.asm | 208 +++++++++++++++++++++++++++ th02_main.asm | 125 +--------------- th02_maine.asm | 125 +--------------- th02_op.asm | 125 +--------------- th03_mainl.asm | 129 +---------------- th03_op.asm | 125 +--------------- th04_maine.asm | 127 +--------------- th04_op.asm | 125 +--------------- 8 files changed, 225 insertions(+), 864 deletions(-) create mode 100644 libs/master.lib/graph_pack_put_8.asm diff --git a/libs/master.lib/graph_pack_put_8.asm b/libs/master.lib/graph_pack_put_8.asm new file mode 100644 index 00000000..47f415ac --- /dev/null +++ b/libs/master.lib/graph_pack_put_8.asm @@ -0,0 +1,208 @@ +; master library - graphic - packedpixel - put - hline - 8dot - PC98V +; +; Description: +; パックト4bitピクセル形式の水平グラフィックパターン表示 +; +; Function/Procedures: +; void graph_pack_put_8( int x, int y, void far * linepat, int len ) ; +; +; Parameters: +; x 描画開始 x 座標( 0〜639, ただし8ドット単位に切り捨て ) +; y 描画 y 座標( 0 〜 399(※400ライン表示のとき) +; linepat パターンデータの先頭アドレス +; len パターンデータの横ドット数 +; ただし実際には8dot単位に切り詰めます。 +; +; Returns: +; none +; +; Binding Target: +; Microsoft-C / Turbo-C / Turbo Pascal +; +; Running Target: +; PC-9801V +; +; Requiring Resources: +; CPU: V30 +; +; Notes: +; クリッピングは縦方向だけ gc_poly 相当の処理を行っています。 +; 横は画面幅でクリッピングできます。 +; +; Assembly Language Note: +; +; +; Compiler/Assembler: +; TASM 3.0 +; OPTASM 1.6 +; +; Author: +; 恋塚昭彦 +; +; Revision History: +; 93/ 6/23 Initial: grppput8.asm/master.lib 0.19 +; 93/ 7/ 3 [M0.20] large modelでのbugfix +; 93/ 7/ 3 [M0.20] クリップ枠最下行を外と判定していた(^^; fix +; 93/ 7/28 [M0.20] ちょっと加速 +; 93/11/22 [M0.21] linepatをfar固定化 +; 93/12/ 8 [M0.22] RotTblを rottbl.asmに分離 + + SCREEN_XBYTE equ 80 + +USE_GRCG = 0 ; 1にするとGRCGを使うが少し遅くなる(RA21+VMM386) +USE_TABLE = 1 + +ROTATE macro wreg,lh,ll + rept 2 + rol wreg,1 + RCL DH,1 + rol wreg,1 + RCL DL,1 + rol wreg,1 + RCL lh,1 + rol wreg,1 + RCL ll,1 + endm +endm +GC_MODEREG equ 7ch +GC_TILEREG equ 7eh + + +MRETURN macro + pop DI + pop SI + pop BP + ret 5*2 + EVEN +endm + +retfunc GRPPPUT8_CLIPOUT + MRETURN +endfunc + +func GRAPH_PACK_PUT_8 ; graph_pack_put_8() { + push BP + mov BP,SP + push SI + push DI + + ; 引数 + @@x = (RETSIZE+5)*2 + @@y = (RETSIZE+4)*2 + @@linepat = (RETSIZE+2)*2 + @@len = (RETSIZE+1)*2 + + mov AX,[BP+@@y] + sub AX,ClipYT + cmp AX,ClipYH + ja short GRPPPUT8_CLIPOUT + + mov CX,[BP+@@len] + sar CX,3 ; 8dot単位に切り捨てる + jle short GRPPPUT8_CLIPOUT + + mov SI,[BP+@@linepat] + + mov DI,[BP+@@x] + sar DI,3 ; xを8ドット単位に補正 + jns short @@XNORMAL + add CX,DI + jle short GRPPPUT8_CLIPOUT + shl DI,2 + add SI,DI + xor DI,DI +@@XNORMAL: + cmp DI,SCREEN_XBYTE + jge short GRPPPUT8_CLIPOUT + + add CX,DI + cmp CX,SCREEN_XBYTE + jl short @@RIGHTCLIPPED + mov CX,SCREEN_XBYTE +@@RIGHTCLIPPED: + sub CX,DI + imul AX,AX,SCREEN_XBYTE + add DI,AX ; DI = draw address + +IF USE_GRCG + pushf + CLI + mov AL,80h ; GC_TDW + out GC_MODEREG,AL + popf +ENDIF + + ; 描画開始 + push DS + mov ES,ClipYT_seg + mov DS,[BP+@@linepat+2] + + mov BP,CX + CLD + EVEN +@@XLOOP: + +IF USE_TABLE + mov CL,2 + + mov BL,[SI] + mov BH,0 + shl BX,CL + mov AX,word ptr CS:RotTbl[BX] + mov DX,word ptr CS:RotTbl[BX+2] + inc SI + REPT 3 + shl AX,CL + shl DX,CL + mov BL,[SI] + mov BH,0 + shl BX,CL + or AX,word ptr CS:RotTbl[BX] + or DX,word ptr CS:RotTbl[BX+2] + inc SI + ENDM +ELSE + mov CX,2 +@@LOOP8: + lodsw + ROTATE AL,BH,BL + ROTATE AH,BH,BL + loop short @@LOOP8 + mov AX,BX +ENDIF + +IF USE_GRCG + out GC_TILEREG,AL + mov AL,AH + out GC_TILEREG,AL + mov AX,DX + out GC_TILEREG,AL + mov AL,AH + out GC_TILEREG,AL + stosb +ELSE + mov ES:[DI],AL ; 0a800h + mov BX,ES + mov ES:[DI+8000h],AH ; 0b000h + add BH,10h + mov ES,BX + mov ES:[DI],DL ; 0b800h + add BH,28h + mov ES,BX + mov ES:[DI],DH ; 0e000h + sub BH,38h + mov ES,BX + inc DI +ENDIF + + dec BP + jnz short @@XLOOP + + pop DS + +IF USE_GRCG + mov AL,0 + out GC_MODEREG,AL +ENDIF + MRETURN +endfunc ; } diff --git a/th02_main.asm b/th02_main.asm index a190ddb8..baae7789 100644 --- a/th02_main.asm +++ b/th02_main.asm @@ -1159,128 +1159,7 @@ include libs/master.lib/graph_copy_page.asm include libs/master.lib/graph_extmode.asm include libs/master.lib/graph_pi_free.asm include libs/master.lib/graph_pi_load_pack.asm - -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR sub_1D06 - -loc_1D00: - pop di - pop si - pop bp - retf 0Ah -; END OF FUNCTION CHUNK FOR sub_1D06 - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_1D06 proc far - -arg_0 = word ptr 6 -arg_2 = word ptr 8 -arg_4 = word ptr 0Ah -arg_6 = word ptr 0Ch -arg_8 = word ptr 0Eh - -; FUNCTION CHUNK AT 1D00 SIZE 00000006 BYTES - - push bp - mov bp, sp - push si - push di - mov ax, [bp+arg_6] - sub ax, ClipYT - cmp ax, ClipYH - ja short loc_1D00 - mov cx, [bp+arg_0] - sar cx, 3 - jle short loc_1D00 - mov si, [bp+arg_2] - mov di, [bp+arg_8] - sar di, 3 - jns short loc_1D36 - add cx, di - jle short loc_1D00 - shl di, 2 - add si, di - xor di, di - -loc_1D36: - cmp di, 50h ; 'P' - jge short loc_1D00 - add cx, di - cmp cx, 50h ; 'P' - jl short loc_1D45 - mov cx, 50h ; 'P' - -loc_1D45: - sub cx, di - imul ax, 50h - add di, ax - push ds - mov es, ClipYT_seg - assume es:nothing - mov ds, [bp+arg_4] - mov bp, cx - cld - nop - -loc_1D58: - mov cl, 2 - mov bl, [si] - mov bh, 0 - shl bx, cl - mov ax, cs:[bx+218Eh] - mov dx, cs:[bx+2190h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+218Eh] - or dx, cs:[bx+2190h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+218Eh] - or dx, cs:[bx+2190h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+218Eh] - or dx, cs:[bx+2190h] - inc si - mov es:[di], al - mov bx, es - mov es:[di-8000h], ah - add bh, 10h - mov es, bx - assume es:nothing - mov es:[di], dl - add bh, 28h ; '(' - mov es, bx - assume es:nothing - mov es:[di], dh - sub bh, 38h ; '8' - mov es, bx - assume es:nothing - inc di - dec bp - jnz short loc_1D58 - pop ds - pop di - pop si - pop bp - retf 0Ah -sub_1D06 endp - +include libs/master.lib/graph_pack_put_8.asm include libs/master.lib/graph_scrollup.asm include libs/master.lib/graph_scroll.asm include libs/master.lib/iatan2.asm @@ -16350,7 +16229,7 @@ loc_F996: mov bx, di imul bx, 48h push word ptr [bx+2318h] - call sub_1D06 + call graph_pack_put_8 inc si cmp si, 190h jl short loc_F9B7 diff --git a/th02_maine.asm b/th02_maine.asm index 7941ea53..8e0f557c 100644 --- a/th02_maine.asm +++ b/th02_maine.asm @@ -844,128 +844,7 @@ sub_13B6 endp include libs/master.lib/graph_pi_free.asm include libs/master.lib/graph_pi_load_pack.asm - -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR sub_1AA6 - -loc_1AA0: - pop di - pop si - pop bp - retf 0Ah -; END OF FUNCTION CHUNK FOR sub_1AA6 - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_1AA6 proc far - -arg_0 = word ptr 6 -arg_2 = word ptr 8 -arg_4 = word ptr 0Ah -arg_6 = word ptr 0Ch -arg_8 = word ptr 0Eh - -; FUNCTION CHUNK AT 1AA0 SIZE 00000006 BYTES - - push bp - mov bp, sp - push si - push di - mov ax, [bp+arg_6] - sub ax, ClipYT - cmp ax, ClipYH - ja short loc_1AA0 - mov cx, [bp+arg_0] - sar cx, 3 - jle short loc_1AA0 - mov si, [bp+arg_2] - mov di, [bp+arg_8] - sar di, 3 - jns short loc_1AD6 - add cx, di - jle short loc_1AA0 - shl di, 2 - add si, di - xor di, di - -loc_1AD6: - cmp di, 50h ; 'P' - jge short loc_1AA0 - add cx, di - cmp cx, 50h ; 'P' - jl short loc_1AE5 - mov cx, 50h ; 'P' - -loc_1AE5: - sub cx, di - imul ax, 50h - add di, ax - push ds - mov es, ClipYT_seg - assume es:nothing - mov ds, [bp+arg_4] - mov bp, cx - cld - nop - -loc_1AF8: - mov cl, 2 - mov bl, [si] - mov bh, 0 - shl bx, cl - mov ax, cs:[bx+1EDCh] - mov dx, cs:[bx+1EDEh] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1EDCh] - or dx, cs:[bx+1EDEh] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1EDCh] - or dx, cs:[bx+1EDEh] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1EDCh] - or dx, cs:[bx+1EDEh] - inc si - mov es:[di], al - mov bx, es - mov es:[di-8000h], ah - add bh, 10h - mov es, bx - assume es:nothing - mov es:[di], dl - add bh, 28h ; '(' - mov es, bx - assume es:nothing - mov es:[di], dh - sub bh, 38h ; '8' - mov es, bx - assume es:nothing - inc di - dec bp - jnz short loc_1AF8 - pop ds - pop di - pop si - pop bp - retf 0Ah -sub_1AA6 endp - +include libs/master.lib/graph_pack_put_8.asm include libs/master.lib/key_sense.asm ; =============== S U B R O U T I N E ======================================= @@ -8682,7 +8561,7 @@ loc_B7D9: mov bx, di imul bx, 48h push word ptr [bx+294Eh] - call sub_1AA6 + call graph_pack_put_8 inc si cmp si, 190h jl short loc_B7FA diff --git a/th02_op.asm b/th02_op.asm index 36a35567..ba870335 100644 --- a/th02_op.asm +++ b/th02_op.asm @@ -1136,128 +1136,7 @@ sub_13D0 endp include libs/master.lib/graph_pi_free.asm include libs/master.lib/graph_pi_load_pack.asm - -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR sub_1AC0 - -loc_1ABA: - pop di - pop si - pop bp - retf 0Ah -; END OF FUNCTION CHUNK FOR sub_1AC0 - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_1AC0 proc far - -arg_0 = word ptr 6 -arg_2 = word ptr 8 -arg_4 = word ptr 0Ah -arg_6 = word ptr 0Ch -arg_8 = word ptr 0Eh - -; FUNCTION CHUNK AT 1ABA SIZE 00000006 BYTES - - push bp - mov bp, sp - push si - push di - mov ax, [bp+arg_6] - sub ax, ClipYT - cmp ax, ClipYH - ja short loc_1ABA - mov cx, [bp+arg_0] - sar cx, 3 - jle short loc_1ABA - mov si, [bp+arg_2] - mov di, [bp+arg_8] - sar di, 3 - jns short loc_1AF0 - add cx, di - jle short loc_1ABA - shl di, 2 - add si, di - xor di, di - -loc_1AF0: - cmp di, 50h ; 'P' - jge short loc_1ABA - add cx, di - cmp cx, 50h ; 'P' - jl short loc_1AFF - mov cx, 50h ; 'P' - -loc_1AFF: - sub cx, di - imul ax, 50h - add di, ax - push ds - mov es, ClipYT_seg - assume es:nothing - mov ds, [bp+arg_4] - mov bp, cx - cld - nop - -loc_1B12: - mov cl, 2 - mov bl, [si] - mov bh, 0 - shl bx, cl - mov ax, cs:[bx+1FE4h] - mov dx, cs:[bx+1FE6h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1FE4h] - or dx, cs:[bx+1FE6h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1FE4h] - or dx, cs:[bx+1FE6h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1FE4h] - or dx, cs:[bx+1FE6h] - inc si - mov es:[di], al - mov bx, es - mov es:[di-8000h], ah - add bh, 10h - mov es, bx - assume es:nothing - mov es:[di], dl - add bh, 28h ; '(' - mov es, bx - assume es:nothing - mov es:[di], dh - sub bh, 38h ; '8' - mov es, bx - assume es:nothing - inc di - dec bp - jnz short loc_1B12 - pop ds - pop di - pop si - pop bp - retf 0Ah -sub_1AC0 endp - +include libs/master.lib/graph_pack_put_8.asm include libs/master.lib/graph_show.asm include libs/master.lib/graph_start.asm include libs/master.lib/keybeep.asm @@ -7335,7 +7214,7 @@ loc_B1A3: mov bx, di imul bx, 48h push word ptr [bx+1B78h] - call sub_1AC0 + call graph_pack_put_8 inc si cmp si, 190h jl short loc_B1C4 diff --git a/th03_mainl.asm b/th03_mainl.asm index dd3af04f..6313c762 100644 --- a/th03_mainl.asm +++ b/th03_mainl.asm @@ -462,128 +462,7 @@ sub_F58 endp include libs/master.lib/graph_pi_free.asm include libs/master.lib/graph_pi_load_pack.asm - -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR sub_1632 - -loc_162C: - pop di - pop si - pop bp - retf 0Ah -; END OF FUNCTION CHUNK FOR sub_1632 - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_1632 proc far - -arg_0 = word ptr 6 -arg_2 = word ptr 8 -arg_4 = word ptr 0Ah -arg_6 = word ptr 0Ch -arg_8 = word ptr 0Eh - -; FUNCTION CHUNK AT 162C SIZE 00000006 BYTES - - push bp - mov bp, sp - push si - push di - mov ax, [bp+arg_6] - sub ax, ClipYT - cmp ax, ClipYH - ja short loc_162C - mov cx, [bp+arg_0] - sar cx, 3 - jle short loc_162C - mov si, [bp+arg_2] - mov di, [bp+arg_8] - sar di, 3 - jns short loc_1662 - add cx, di - jle short loc_162C - shl di, 2 - add si, di - xor di, di - -loc_1662: - cmp di, 50h ; 'P' - jge short loc_162C - add cx, di - cmp cx, 50h ; 'P' - jl short loc_1671 - mov cx, 50h ; 'P' - -loc_1671: - sub cx, di - imul ax, 50h - add di, ax - push ds - mov es, ClipYT_seg - assume es:nothing - mov ds, [bp+arg_4] - mov bp, cx - cld - nop - -loc_1684: - mov cl, 2 - mov bl, [si] - mov bh, 0 - shl bx, cl - mov ax, cs:[bx+1AAAh] - mov dx, cs:[bx+1AACh] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1AAAh] - or dx, cs:[bx+1AACh] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1AAAh] - or dx, cs:[bx+1AACh] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1AAAh] - or dx, cs:[bx+1AACh] - inc si - mov es:[di], al - mov bx, es - mov es:[di-8000h], ah - add bh, 10h - mov es, bx - assume es:nothing - mov es:[di], dl - add bh, 28h ; '(' - mov es, bx - assume es:nothing - mov es:[di], dh - sub bh, 38h ; '8' - mov es, bx - assume es:nothing - inc di - dec bp - jnz short loc_1684 - pop ds - pop di - pop si - pop bp - retf 0Ah -sub_1632 endp - +include libs/master.lib/graph_pack_put_8.asm include libs/master.lib/graph_scrollup.asm include libs/master.lib/graph_show.asm include libs/master.lib/iatan2.asm @@ -10975,7 +10854,7 @@ loc_CD55: mov bx, di imul bx, 48h push word ptr [bx+1F3Ah] - call sub_1632 + call graph_pack_put_8 inc si cmp si, 190h jl short loc_CD76 @@ -11046,7 +10925,7 @@ loc_CDDD: mov bx, di imul bx, 48h push word ptr [bx+1F3Ah] - call sub_1632 + call graph_pack_put_8 inc si cmp si, 190h jl short loc_CDFE @@ -12110,7 +11989,7 @@ loc_D556: push si push large [bp+var_4] push 140h - call sub_1632 + call graph_pack_put_8 inc si cmp si, 190h jl short loc_D571 diff --git a/th03_op.asm b/th03_op.asm index 6f756444..d8bd0cb3 100644 --- a/th03_op.asm +++ b/th03_op.asm @@ -751,128 +751,7 @@ sub_1232 endp include libs/master.lib/graph_pi_free.asm include libs/master.lib/graph_pi_load_pack.asm - -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR sub_1922 - -loc_191C: - pop di - pop si - pop bp - retf 0Ah -; END OF FUNCTION CHUNK FOR sub_1922 - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_1922 proc far - -arg_0 = word ptr 6 -arg_2 = word ptr 8 -arg_4 = word ptr 0Ah -arg_6 = word ptr 0Ch -arg_8 = word ptr 0Eh - -; FUNCTION CHUNK AT 191C SIZE 00000006 BYTES - - push bp - mov bp, sp - push si - push di - mov ax, [bp+arg_6] - sub ax, ClipYT - cmp ax, ClipYH - ja short loc_191C - mov cx, [bp+arg_0] - sar cx, 3 - jle short loc_191C - mov si, [bp+arg_2] - mov di, [bp+arg_8] - sar di, 3 - jns short loc_1952 - add cx, di - jle short loc_191C - shl di, 2 - add si, di - xor di, di - -loc_1952: - cmp di, 50h ; 'P' - jge short loc_191C - add cx, di - cmp cx, 50h ; 'P' - jl short loc_1961 - mov cx, 50h ; 'P' - -loc_1961: - sub cx, di - imul ax, 50h - add di, ax - push ds - mov es, ClipYT_seg - assume es:nothing - mov ds, [bp+arg_4] - mov bp, cx - cld - nop - -loc_1974: - mov cl, 2 - mov bl, [si] - mov bh, 0 - shl bx, cl - mov ax, cs:[bx+1D7Eh] - mov dx, cs:[bx+1D80h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1D7Eh] - or dx, cs:[bx+1D80h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1D7Eh] - or dx, cs:[bx+1D80h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1D7Eh] - or dx, cs:[bx+1D80h] - inc si - mov es:[di], al - mov bx, es - mov es:[di-8000h], ah - add bh, 10h - mov es, bx - assume es:nothing - mov es:[di], dl - add bh, 28h ; '(' - mov es, bx - assume es:nothing - mov es:[di], dh - sub bh, 38h ; '8' - mov es, bx - assume es:nothing - inc di - dec bp - jnz short loc_1974 - pop ds - pop di - pop si - pop bp - retf 0Ah -sub_1922 endp - +include libs/master.lib/graph_pack_put_8.asm include libs/master.lib/graph_show.asm include libs/master.lib/graph_start.asm include libs/master.lib/js_end.asm @@ -10022,7 +9901,7 @@ loc_C3A1: mov bx, di imul bx, 48h push word ptr [bx+1CD4h] - call sub_1922 + call graph_pack_put_8 inc si cmp si, 190h jl short loc_C3C2 diff --git a/th04_maine.asm b/th04_maine.asm index 50a6706c..ef75d9ef 100644 --- a/th04_maine.asm +++ b/th04_maine.asm @@ -382,128 +382,7 @@ include libs/master.lib/graph_extmode.asm include libs/master.lib/graph_hide.asm include libs/master.lib/graph_pi_free.asm include libs/master.lib/graph_pi_load_pack.asm - -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR sub_18BA - -loc_18B4: - pop di - pop si - pop bp - retf 0Ah -; END OF FUNCTION CHUNK FOR sub_18BA - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_18BA proc far - -arg_0 = word ptr 6 -arg_2 = word ptr 8 -arg_4 = word ptr 0Ah -arg_6 = word ptr 0Ch -arg_8 = word ptr 0Eh - -; FUNCTION CHUNK AT 18B4 SIZE 00000006 BYTES - - push bp - mov bp, sp - push si - push di - mov ax, [bp+arg_6] - sub ax, ClipYT - cmp ax, ClipYH - ja short loc_18B4 - mov cx, [bp+arg_0] - sar cx, 3 - jle short loc_18B4 - mov si, [bp+arg_2] - mov di, [bp+arg_8] - sar di, 3 - jns short loc_18EA - add cx, di - jle short loc_18B4 - shl di, 2 - add si, di - xor di, di - -loc_18EA: - cmp di, 50h ; 'P' - jge short loc_18B4 - add cx, di - cmp cx, 50h ; 'P' - jl short loc_18F9 - mov cx, 50h ; 'P' - -loc_18F9: - sub cx, di - imul ax, 50h - add di, ax - push ds - mov es, ClipYT_seg - assume es:nothing - mov ds, [bp+arg_4] - mov bp, cx - cld - nop - -loc_190C: - mov cl, 2 - mov bl, [si] - mov bh, 0 - shl bx, cl - mov ax, cs:[bx+1C84h] - mov dx, cs:[bx+1C86h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1C84h] - or dx, cs:[bx+1C86h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1C84h] - or dx, cs:[bx+1C86h] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+1C84h] - or dx, cs:[bx+1C86h] - inc si - mov es:[di], al - mov bx, es - mov es:[di-8000h], ah - add bh, 10h - mov es, bx - assume es:nothing - mov es:[di], dl - add bh, 28h ; '(' - mov es, bx - assume es:nothing - mov es:[di], dh - sub bh, 38h ; '8' - mov es, bx - assume es:nothing - inc di - dec bp - jnz short loc_190C - pop ds - pop di - pop si - pop bp - retf 0Ah -sub_18BA endp - +include libs/master.lib/graph_pack_put_8.asm include libs/master.lib/graph_scrollup.asm include libs/master.lib/graph_show.asm include libs/master.lib/js_end.asm @@ -9564,7 +9443,7 @@ loc_CD03: mov bx, di imul bx, 48h push word ptr [bx+17CEh] - call sub_18BA + call graph_pack_put_8 inc si cmp si, 190h jl short loc_CD24 @@ -9702,7 +9581,7 @@ loc_CE10: push si push large [bp+var_4] push 140h - call sub_18BA + call graph_pack_put_8 inc si cmp si, 190h jl short loc_CE2B diff --git a/th04_op.asm b/th04_op.asm index 3e0e2ab5..1ef90034 100644 --- a/th04_op.asm +++ b/th04_op.asm @@ -796,128 +796,7 @@ include libs/master.lib/graph_copy_page.asm include libs/master.lib/graph_extmode.asm include libs/master.lib/graph_pi_free.asm include libs/master.lib/graph_pi_load_pack.asm - -; --------------------------------------------------------------------------- -; START OF FUNCTION CHUNK FOR sub_1C5E - -loc_1C58: - pop di - pop si - pop bp - retf 0Ah -; END OF FUNCTION CHUNK FOR sub_1C5E - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_1C5E proc far - -arg_0 = word ptr 6 -arg_2 = word ptr 8 -arg_4 = word ptr 0Ah -arg_6 = word ptr 0Ch -arg_8 = word ptr 0Eh - -; FUNCTION CHUNK AT 1C58 SIZE 00000006 BYTES - - push bp - mov bp, sp - push si - push di - mov ax, [bp+arg_6] - sub ax, ClipYT - cmp ax, ClipYH - ja short loc_1C58 - mov cx, [bp+arg_0] - sar cx, 3 - jle short loc_1C58 - mov si, [bp+arg_2] - mov di, [bp+arg_8] - sar di, 3 - jns short loc_1C8E - add cx, di - jle short loc_1C58 - shl di, 2 - add si, di - xor di, di - -loc_1C8E: - cmp di, 50h ; 'P' - jge short loc_1C58 - add cx, di - cmp cx, 50h ; 'P' - jl short loc_1C9D - mov cx, 50h ; 'P' - -loc_1C9D: - sub cx, di - imul ax, 50h - add di, ax - push ds - mov es, ClipYT_seg - assume es:nothing - mov ds, [bp+arg_4] - mov bp, cx - cld - nop - -loc_1CB0: - mov cl, 2 - mov bl, [si] - mov bh, 0 - shl bx, cl - mov ax, cs:[bx+2078h] - mov dx, cs:[bx+207Ah] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+2078h] - or dx, cs:[bx+207Ah] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+2078h] - or dx, cs:[bx+207Ah] - inc si - shl ax, cl - shl dx, cl - mov bl, [si] - mov bh, 0 - shl bx, cl - or ax, cs:[bx+2078h] - or dx, cs:[bx+207Ah] - inc si - mov es:[di], al - mov bx, es - mov es:[di-8000h], ah - add bh, 10h - mov es, bx - assume es:nothing - mov es:[di], dl - add bh, 28h ; '(' - mov es, bx - assume es:nothing - mov es:[di], dh - sub bh, 38h ; '8' - mov es, bx - assume es:nothing - inc di - dec bp - jnz short loc_1CB0 - pop ds - pop di - pop si - pop bp - retf 0Ah -sub_1C5E endp - +include libs/master.lib/graph_pack_put_8.asm include libs/master.lib/graph_show.asm include libs/master.lib/graph_start.asm include libs/master.lib/js_end.asm @@ -10824,7 +10703,7 @@ loc_DA9B: mov bx, di imul bx, 48h push word ptr [bx+239Ch] - call sub_1C5E + call graph_pack_put_8 inc si cmp si, 190h jl short loc_DABC