mirror of https://github.com/nmlgc/ReC98.git
[Reduction] #377-378: super_large_put
[Binary change] db 0 → nop after the end of the DISP8 function in both executables.
This commit is contained in:
parent
1a0ec60825
commit
dd4c95e249
|
@ -0,0 +1,3 @@
|
|||
public LARGE_BYTE
|
||||
LARGE_BYTE DB 000h,003h,00ch,00fh,030h,033h,03ch,03fh
|
||||
DB 0c0h,0c3h,0cch,0cfh,0f0h,0f3h,0fch,0ffh
|
|
@ -0,0 +1,162 @@
|
|||
; superimpose & master library module
|
||||
;
|
||||
; Description:
|
||||
; 大きさを縦横2倍に拡大してパターンを表示する
|
||||
;
|
||||
; Functions/Procedures:
|
||||
; void super_large_put( int x, int y, int num ) ;
|
||||
;
|
||||
; Parameters:
|
||||
; x,y 左上端の座標
|
||||
; num パターン番号
|
||||
;
|
||||
; Returns:
|
||||
; none
|
||||
;
|
||||
; Binding Target:
|
||||
; Microsoft-C / Turbo-C / Turbo Pascal
|
||||
;
|
||||
; Running Target:
|
||||
; PC-9801
|
||||
;
|
||||
; Requiring Resources:
|
||||
; CPU: 8086
|
||||
;
|
||||
; Notes:
|
||||
; クリッピングしてません
|
||||
;
|
||||
; Compiler/Assembler:
|
||||
; TASM 3.0
|
||||
; OPTASM 1.6
|
||||
;
|
||||
; Author:
|
||||
; Kazumi(奥田 仁)
|
||||
; 恋塚(恋塚昭彦)
|
||||
;
|
||||
; Revision History:
|
||||
;
|
||||
;$Id: largeput.asm 0.04 92/05/29 20:06:02 Kazumi Rel $
|
||||
;
|
||||
; 93/ 3/10 Initial: master.lib <- super.lib 0.22b
|
||||
;
|
||||
|
||||
func SUPER_LARGE_PUT ; super_large_put() {
|
||||
push BP
|
||||
mov BP,SP
|
||||
push DS
|
||||
push SI
|
||||
push DI
|
||||
|
||||
@@x = (RETSIZE+3)*2
|
||||
@@y = (RETSIZE+2)*2
|
||||
@@num = (RETSIZE+1)*2
|
||||
|
||||
mov ES,graph_VramSeg
|
||||
|
||||
mov CX,[BP+@@x]
|
||||
mov DI,[BP+@@y]
|
||||
mov AX,DI ;-+
|
||||
shl AX,2 ; |
|
||||
add DI,AX ; |DI=y*80
|
||||
shl DI,4 ;-+
|
||||
mov AX,CX
|
||||
and CX,7h ;CL=x%8(shift dot counter)
|
||||
shr AX,3 ;AX=x/8
|
||||
add DI,AX ;GVRAM offset address
|
||||
mov WORD PTR CS:[LARGEPUT_DI_],DI
|
||||
|
||||
mov BX,[BP+@@num]
|
||||
shl BX,1 ;integer size & near pointer
|
||||
mov DX,super_patsize[BX] ;pattern size (1-8)
|
||||
xor SI,SI
|
||||
mov DS,super_patdata[BX] ;BX+2 -> BX
|
||||
mov BX,DX
|
||||
xor BH,BH
|
||||
mov DL,DH ;????
|
||||
xor DH,DH ;????
|
||||
mov BYTE PTR CS:[LARGEPUT_CH_],BL
|
||||
mov AX,160
|
||||
sub AX,DX
|
||||
sub AX,DX ;large
|
||||
mov WORD PTR CS:[largeput_add_di],AX
|
||||
|
||||
mov AL,0c0h ;RMW mode
|
||||
out 7ch,AL
|
||||
xor AL,AL
|
||||
out 7eh,AL
|
||||
out 7eh,AL
|
||||
out 7eh,AL
|
||||
out 7eh,AL
|
||||
|
||||
mov DH,DL
|
||||
call LARGEPUT_DISP8 ;originally cls_loop
|
||||
|
||||
mov AL,0FFh
|
||||
out 7eh,AL
|
||||
out 7eh,AL
|
||||
out 7eh,AL
|
||||
out 7eh,AL
|
||||
|
||||
mov AL,11001110b
|
||||
out 7ch,AL ;RMW mode
|
||||
call LARGEPUT_DISP8
|
||||
mov AL,11001101b
|
||||
out 7ch,AL ;RMW mode
|
||||
call LARGEPUT_DISP8
|
||||
mov AL,11001011b
|
||||
out 7ch,AL ;RMW mode
|
||||
call LARGEPUT_DISP8
|
||||
mov AL,11000111b
|
||||
out 7ch,AL ;RMW mode
|
||||
call LARGEPUT_DISP8
|
||||
xor AL,AL
|
||||
out 7ch,AL ;grcg stop
|
||||
|
||||
pop DI
|
||||
pop SI
|
||||
pop DS
|
||||
pop BP
|
||||
ret 6
|
||||
endfunc ; }
|
||||
|
||||
; IN:
|
||||
; AH
|
||||
; DH
|
||||
|
||||
LARGEPUT_DISP8 proc near
|
||||
mov CH,11h ;dummy
|
||||
LARGEPUT_CH_ EQU $-1
|
||||
mov DI,1111h ;dummy
|
||||
LARGEPUT_DI_ EQU $-2
|
||||
EVEN
|
||||
|
||||
@@PUT_LOOP:
|
||||
lodsb
|
||||
mov BP,AX
|
||||
and AX,00f0h
|
||||
shr AX,4
|
||||
mov BX,AX
|
||||
mov AL,CS:LARGE_BYTE[BX]
|
||||
xor AH,AH
|
||||
ror AX,CL
|
||||
mov ES:[DI],AX ;stosw より速い
|
||||
mov ES:[DI+80],AX
|
||||
inc DI
|
||||
and BP,000fh
|
||||
mov AL,CS:LARGE_BYTE[BP]
|
||||
xor AH,AH
|
||||
ror AX,CL
|
||||
mov ES:[DI],AX ;stosw より速い
|
||||
mov ES:[DI+80],AX
|
||||
inc DI
|
||||
dec DH
|
||||
jnz short @@PUT_LOOP
|
||||
|
||||
add DI,1111h ;dummy
|
||||
largeput_add_di EQU $-2
|
||||
mov DH,DL
|
||||
dec CH
|
||||
jnz short @@PUT_LOOP
|
||||
|
||||
ret
|
||||
LARGEPUT_DISP8 endp
|
130
th04_main.asm
130
th04_main.asm
|
@ -1180,122 +1180,8 @@ sub_1D50 endp
|
|||
|
||||
include libs/master.lib/iatan2.asm
|
||||
include libs/master.lib/js_end.asm
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
db 0, 3, 0Ch, 0Fh, 30h, 33h, 3Ch, 3Fh, 0C0h, 0C3h, 0CCh
|
||||
db 0CFh, 0F0h, 0F3h, 0FCh, 0FFh
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_1E2A proc far
|
||||
|
||||
arg_0 = word ptr 6
|
||||
arg_2 = word ptr 8
|
||||
arg_4 = word ptr 0Ah
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push ds
|
||||
push si
|
||||
push di
|
||||
mov es, graph_VramSeg
|
||||
assume es:nothing
|
||||
mov cx, [bp+arg_4]
|
||||
mov di, [bp+arg_2]
|
||||
mov ax, di
|
||||
shl ax, 2
|
||||
add di, ax
|
||||
shl di, 4
|
||||
mov ax, cx
|
||||
and cx, 7
|
||||
shr ax, 3
|
||||
add di, ax
|
||||
mov cs:word_1EC1, di
|
||||
mov bx, [bp+arg_0]
|
||||
shl bx, 1
|
||||
mov dx, [bx+2EC4h]
|
||||
xor si, si
|
||||
mov ds, word ptr [bx+2AC4h]
|
||||
mov bx, dx
|
||||
xor bh, bh
|
||||
mov dl, dh
|
||||
xor dh, dh
|
||||
mov cs:byte_1EBF, bl
|
||||
mov ax, 0A0h ; ' '
|
||||
sub ax, dx
|
||||
sub ax, dx
|
||||
mov cs:word_1EFA, ax
|
||||
mov al, 0C0h ; 'À'
|
||||
out 7Ch, al
|
||||
xor al, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
mov dh, dl
|
||||
call near ptr byte_1EBE
|
||||
mov al, 0FFh
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
mov al, 0CEh ; 'Î'
|
||||
out 7Ch, al
|
||||
call near ptr byte_1EBE
|
||||
mov al, 0CDh ; 'Í'
|
||||
out 7Ch, al
|
||||
call near ptr byte_1EBE
|
||||
mov al, 0CBh ; 'Ë'
|
||||
out 7Ch, al
|
||||
call near ptr byte_1EBE
|
||||
mov al, 0C7h ; 'Ç'
|
||||
out 7Ch, al
|
||||
call near ptr byte_1EBE
|
||||
xor al, al
|
||||
out 7Ch, al
|
||||
pop di
|
||||
pop si
|
||||
pop ds
|
||||
pop bp
|
||||
retf 6
|
||||
sub_1E2A endp
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
byte_1EBE db 0B5h
|
||||
byte_1EBF db 11h
|
||||
db 0BFh
|
||||
word_1EC1 dw 1111h
|
||||
; ---------------------------------------------------------------------------
|
||||
nop
|
||||
|
||||
loc_1EC4:
|
||||
lodsb
|
||||
mov bp, ax
|
||||
and ax, 0F0h
|
||||
shr ax, 4
|
||||
mov bx, ax
|
||||
mov al, cs:[bx+1E1Ah]
|
||||
xor ah, ah
|
||||
ror ax, cl
|
||||
mov es:[di], ax
|
||||
mov es:[di+50h], ax
|
||||
inc di
|
||||
and bp, 0Fh
|
||||
mov al, cs:[bp+1E1Ah]
|
||||
xor ah, ah
|
||||
ror ax, cl
|
||||
mov es:[di], ax
|
||||
mov es:[di+50h], ax
|
||||
inc di
|
||||
dec dh
|
||||
jnz short loc_1EC4
|
||||
; ---------------------------------------------------------------------------
|
||||
db 81h ; <20>
|
||||
db 0C7h ; Ç
|
||||
word_1EFA dw 1111h
|
||||
db 8Ah, 0F2h, 0FEh, 0CDh, 75h, 0C2h, 0C3h, 0
|
||||
include libs/master.lib/large_byte.asm
|
||||
include libs/master.lib/super_large_put.asm
|
||||
include libs/master.lib/palette_show.asm
|
||||
include libs/master.lib/pfclose.asm
|
||||
|
||||
|
@ -14992,7 +14878,7 @@ loc_EDC3:
|
|||
mov al, byte_26718
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_1E2A
|
||||
call super_large_put
|
||||
|
||||
loc_EDD7:
|
||||
call sub_D88C
|
||||
|
@ -20135,7 +20021,7 @@ loc_11629:
|
|||
mov al, byte_26718
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_1E2A
|
||||
call super_large_put
|
||||
|
||||
loc_1163D:
|
||||
call sub_D88C
|
||||
|
@ -20545,7 +20431,7 @@ loc_1193A:
|
|||
mov al, byte_26718
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_1E2A
|
||||
call super_large_put
|
||||
|
||||
loc_11961:
|
||||
call sub_D88C
|
||||
|
@ -20676,7 +20562,7 @@ loc_11A69:
|
|||
mov al, byte_26718
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_1E2A
|
||||
call super_large_put
|
||||
|
||||
loc_11A90:
|
||||
call sub_D88C
|
||||
|
@ -21178,7 +21064,7 @@ loc_11E5D:
|
|||
mov al, byte_26718
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_1E2A
|
||||
call super_large_put
|
||||
|
||||
loc_11E71:
|
||||
cmp byte_25A27, 1
|
||||
|
@ -23424,7 +23310,7 @@ loc_12F2E:
|
|||
mov al, byte_26718
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_1E2A
|
||||
call super_large_put
|
||||
|
||||
loc_12F55:
|
||||
call sub_D88C
|
||||
|
|
115
th05_main.asm
115
th05_main.asm
|
@ -1559,101 +1559,8 @@ word_202A dw 1234h
|
|||
pop bp
|
||||
retn
|
||||
; ---------------------------------------------------------------------------
|
||||
db 0, 3, 0Ch, 0Fh, 30h, 33h, 3Ch, 3Fh, 0C0h, 0C3h, 0CCh
|
||||
db 0CFh, 0F0h, 0F3h, 0FCh, 0FFh
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
; Attributes: bp-based frame
|
||||
|
||||
sub_2048 proc far
|
||||
|
||||
arg_0 = word ptr 6
|
||||
arg_2 = word ptr 8
|
||||
arg_4 = word ptr 0Ah
|
||||
|
||||
push bp
|
||||
mov bp, sp
|
||||
push ds
|
||||
push si
|
||||
push di
|
||||
mov es, graph_VramSeg
|
||||
assume es:nothing
|
||||
mov cx, [bp+arg_4]
|
||||
mov di, [bp+arg_2]
|
||||
mov ax, di
|
||||
shl ax, 2
|
||||
add di, ax
|
||||
shl di, 4
|
||||
mov ax, cx
|
||||
and cx, 7
|
||||
shr ax, 3
|
||||
add di, ax
|
||||
mov cs:word_20DF, di
|
||||
mov bx, [bp+arg_0]
|
||||
shl bx, 1
|
||||
mov dx, [bx+2A9Eh]
|
||||
xor si, si
|
||||
mov ds, word ptr [bx+269Eh]
|
||||
mov bx, dx
|
||||
xor bh, bh
|
||||
mov dl, dh
|
||||
xor dh, dh
|
||||
mov cs:byte_20DD, bl
|
||||
mov ax, 0A0h ; ' '
|
||||
sub ax, dx
|
||||
sub ax, dx
|
||||
mov cs:word_2118, ax
|
||||
mov al, 0C0h ; 'À'
|
||||
out 7Ch, al
|
||||
xor al, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
mov dh, dl
|
||||
call near ptr byte_20DC
|
||||
mov al, 0FFh
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
out 7Eh, al
|
||||
mov al, 0CEh ; 'Î'
|
||||
out 7Ch, al
|
||||
call near ptr byte_20DC
|
||||
mov al, 0CDh ; 'Í'
|
||||
out 7Ch, al
|
||||
call near ptr byte_20DC
|
||||
mov al, 0CBh ; 'Ë'
|
||||
out 7Ch, al
|
||||
call near ptr byte_20DC
|
||||
mov al, 0C7h ; 'Ç'
|
||||
out 7Ch, al
|
||||
call near ptr byte_20DC
|
||||
xor al, al
|
||||
out 7Ch, al
|
||||
pop di
|
||||
pop si
|
||||
pop ds
|
||||
pop bp
|
||||
retf 6
|
||||
sub_2048 endp
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
byte_20DC db 0B5h
|
||||
byte_20DD db 11h
|
||||
db 0BFh
|
||||
word_20DF dw 1111h
|
||||
nop
|
||||
db 0ACh, 8Bh, 0E8h, 25h, 0F0h, 0, 0C1h, 0E8h, 4, 8Bh, 0D8h
|
||||
db 2Eh, 8Ah, 87h, 38h, 20h, 32h, 0E4h, 0D3h, 0C8h, 26h
|
||||
db 89h, 5, 26h, 89h, 45h, 50h, 47h, 83h, 0E5h, 0Fh, 2Eh
|
||||
db 8Ah, 86h, 38h, 20h, 32h, 0E4h, 0D3h, 0C8h, 26h, 89h
|
||||
db 5, 26h, 89h, 45h, 50h, 47h, 0FEh, 0CEh, 75h, 0CCh, 81h
|
||||
db 0C7h
|
||||
word_2118 dw 1111h
|
||||
db 8Ah, 0F2h, 0FEh, 0CDh, 75h, 0C2h, 0C3h, 0
|
||||
|
||||
include libs/master.lib/large_byte.asm
|
||||
include libs/master.lib/super_large_put.asm
|
||||
include libs/master.lib/make_linework.asm
|
||||
include libs/master.lib/palette_show.asm
|
||||
include libs/master.lib/pfclose.asm
|
||||
|
@ -18691,7 +18598,7 @@ sub_10848 endp
|
|||
mov al, byte_26344
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_2048
|
||||
call super_large_put
|
||||
|
||||
loc_10932:
|
||||
jmp short loc_10999
|
||||
|
@ -18843,7 +18750,7 @@ loc_10A26:
|
|||
mov al, byte_26344
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_2048
|
||||
call super_large_put
|
||||
|
||||
loc_10A57:
|
||||
jmp short loc_10A94
|
||||
|
@ -19147,7 +19054,7 @@ sub_10B1D endp
|
|||
mov al, byte_26344
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_2048
|
||||
call super_large_put
|
||||
jmp short loc_10D1C
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
|
@ -19288,7 +19195,7 @@ sub_10D26 endp
|
|||
mov al, byte_26344
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_2048
|
||||
call super_large_put
|
||||
jmp short loc_10E07
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
|
@ -19298,7 +19205,7 @@ loc_10DBC:
|
|||
mov al, byte_2635C
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_2048
|
||||
call super_large_put
|
||||
push si
|
||||
push di
|
||||
mov al, byte_26344
|
||||
|
@ -19481,7 +19388,7 @@ loc_10F08:
|
|||
mov al, byte_26344
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_2048
|
||||
call super_large_put
|
||||
|
||||
loc_10F40:
|
||||
jmp short loc_10F86
|
||||
|
@ -19582,7 +19489,7 @@ loc_10FC9:
|
|||
mov al, byte_26344
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_2048
|
||||
call super_large_put
|
||||
jmp short loc_11069
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
|
@ -19718,7 +19625,7 @@ loc_110D8:
|
|||
mov al, byte_26344
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_2048
|
||||
call super_large_put
|
||||
jmp short loc_1117A
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
|
@ -20528,7 +20435,7 @@ loc_117BA:
|
|||
mov al, byte_26344
|
||||
mov ah, 0
|
||||
push ax
|
||||
call sub_2048
|
||||
call super_large_put
|
||||
jmp short loc_11862
|
||||
; ---------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue