Skip to content

Commit

Permalink
[Reduction] #27: check_machine_fmr
Browse files Browse the repository at this point in the history
  • Loading branch information
nmlgc committed Aug 14, 2014
1 parent 5764275 commit cc313d5
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 95 deletions.
40 changes: 40 additions & 0 deletions libs/master.lib/check_machine_fmr.asm
@@ -0,0 +1,40 @@
; Hiper library
;
; Description:
; FM-R かどうかを check する
;
; Procedures/Functions:
; int check_machine_fmr( void );
;
; Parameters:
;
; Returns:
; ==0 : FM-R
; !=0 : not FM-R
;
; Binding Target:
; Microsoft-C / Turbo-C
;
; Running Target:
;
; Requiring Resources:
; CPU: 8086
;
; Notes:
;
; Compiler/Assembler:
; OPTASM 1.6
;
; Author:
; のろ/V(H.Maeda)
;
; Revision History:
; 94/ 3/25 Initial

check_machine_fmr proc
mov AX,0ffffh
mov ES,AX
mov AX,0fc00h
sub AX,ES:[0003h]
ret
endp
20 changes: 4 additions & 16 deletions th04_main.asm
Expand Up @@ -3615,7 +3615,7 @@ sub_17FA endp

loc_1806:
push cs
call near ptr sub_1A0C
call near ptr check_machine_fmr
jnz short loc_1811
mov ax, 40h ; '@'
jmp short loc_187D
Expand Down Expand Up @@ -3689,7 +3689,7 @@ loc_187D:

loc_1884:
push cs
call near ptr sub_1A0C
call near ptr check_machine_fmr
jnz short loc_1890
mov ax, 80h ; '�'
jmp loc_19B9
Expand Down Expand Up @@ -3958,19 +3958,7 @@ loc_1A07:
; ---------------------------------------------------------------------------
nop

; =============== S U B R O U T I N E =======================================


sub_1A0C proc far
; sub_1A1A-195p ...
mov ax, 0FFFFh
mov es, ax
assume es:nothing
mov ax, 0FC00h
sub ax, es:3
retf
sub_1A0C endp

include libs/master.lib/check_machine_fmr.asm

; =============== S U B R O U T I N E =======================================

Expand All @@ -3982,7 +3970,7 @@ sub_1A1A proc far
; FUNCTION CHUNK AT 19DA SIZE 00000031 BYTES

push cs
call near ptr sub_1A0C
call near ptr check_machine_fmr
jz short loc_1A31
mov ah, 0Fh
int 10h ; - VIDEO - GET CURRENT VIDEO MODE
Expand Down
19 changes: 4 additions & 15 deletions th04_maine.asm
Expand Up @@ -2049,7 +2049,7 @@ sub_CB2 endp

loc_CBE:
push cs
call near ptr sub_EC4
call near ptr check_machine_fmr
jnz short loc_CC9
mov ax, 40h ; '@'
jmp short loc_D35
Expand Down Expand Up @@ -2122,7 +2122,7 @@ loc_D35:

loc_D3C:
push cs
call near ptr sub_EC4
call near ptr check_machine_fmr
jnz short loc_D48
mov ax, 80h ; '�'
jmp loc_E71
Expand Down Expand Up @@ -2387,18 +2387,7 @@ loc_EBF:
; ---------------------------------------------------------------------------
nop

; =============== S U B R O U T I N E =======================================


sub_EC4 proc far
mov ax, 0FFFFh
mov es, ax
assume es:nothing
mov ax, 0FC00h
sub ax, es:3
retf
sub_EC4 endp

include libs/master.lib/check_machine_fmr.asm

; =============== S U B R O U T I N E =======================================

Expand All @@ -2410,7 +2399,7 @@ sub_ED2 proc far
; FUNCTION CHUNK AT 0E92 SIZE 00000031 BYTES

push cs
call near ptr sub_EC4
call near ptr check_machine_fmr
jz short loc_EE9
mov ah, 0Fh
int 10h ; - VIDEO - GET CURRENT VIDEO MODE
Expand Down
20 changes: 4 additions & 16 deletions th04_op.asm
Expand Up @@ -2632,7 +2632,7 @@ sub_10D2 endp

loc_1102:
push cs
call near ptr sub_1308
call near ptr check_machine_fmr
jnz short loc_110D
mov ax, 40h ; '@'
jmp short loc_1179
Expand Down Expand Up @@ -2706,7 +2706,7 @@ loc_1179:

loc_1180:
push cs
call near ptr sub_1308
call near ptr check_machine_fmr
jnz short loc_118C
mov ax, 80h ; '�'
jmp loc_12B5
Expand Down Expand Up @@ -2975,19 +2975,7 @@ loc_1303:
; ---------------------------------------------------------------------------
nop

; =============== S U B R O U T I N E =======================================


sub_1308 proc far
; sub_1316-195p ...
mov ax, 0FFFFh
mov es, ax
assume es:nothing
mov ax, 0FC00h
sub ax, es:3
retf
sub_1308 endp

include libs/master.lib/check_machine_fmr.asm

; =============== S U B R O U T I N E =======================================

Expand All @@ -2999,7 +2987,7 @@ sub_1316 proc far
; FUNCTION CHUNK AT 12D6 SIZE 00000031 BYTES

push cs
call near ptr sub_1308
call near ptr check_machine_fmr
jz short loc_132D
mov ah, 0Fh
int 10h ; - VIDEO - GET CURRENT VIDEO MODE
Expand Down
20 changes: 4 additions & 16 deletions th05_main.asm
Expand Up @@ -3996,7 +3996,7 @@ sub_1B3E endp

loc_1B4A:
push cs
call near ptr sub_1D50
call near ptr check_machine_fmr
jnz short loc_1B55
mov ax, 40h ; '@'
jmp short loc_1BC1
Expand Down Expand Up @@ -4070,7 +4070,7 @@ loc_1BC1:

loc_1BC8:
push cs
call near ptr sub_1D50
call near ptr check_machine_fmr
jnz short loc_1BD4
mov ax, 80h ; '�'
jmp loc_1CFD
Expand Down Expand Up @@ -4339,19 +4339,7 @@ loc_1D4B:
; ---------------------------------------------------------------------------
nop

; =============== S U B R O U T I N E =======================================


sub_1D50 proc far
; sub_1D5E-195p ...
mov ax, 0FFFFh
mov es, ax
assume es:nothing
mov ax, 0FC00h
sub ax, es:3
retf
sub_1D50 endp

include libs/master.lib/check_machine_fmr.asm

; =============== S U B R O U T I N E =======================================

Expand All @@ -4363,7 +4351,7 @@ sub_1D5E proc far
; FUNCTION CHUNK AT 1D1E SIZE 00000031 BYTES

push cs
call near ptr sub_1D50
call near ptr check_machine_fmr
jz short loc_1D75
mov ah, 0Fh
int 10h ; - VIDEO - GET CURRENT VIDEO MODE
Expand Down
20 changes: 4 additions & 16 deletions th05_maine.asm
Expand Up @@ -2551,7 +2551,7 @@ sub_FDE endp

loc_FEA:
push cs
call near ptr sub_11F0
call near ptr check_machine_fmr
jnz short loc_FF5
mov ax, 40h ; '@'
jmp short loc_1061
Expand Down Expand Up @@ -2625,7 +2625,7 @@ loc_1061:

loc_1068:
push cs
call near ptr sub_11F0
call near ptr check_machine_fmr
jnz short loc_1074
mov ax, 80h ; '�'
jmp loc_119D
Expand Down Expand Up @@ -2894,19 +2894,7 @@ loc_11EB:
; ---------------------------------------------------------------------------
nop

; =============== S U B R O U T I N E =======================================


sub_11F0 proc far
; sub_11FE-195p ...
mov ax, 0FFFFh
mov es, ax
assume es:nothing
mov ax, 0FC00h
sub ax, es:3
retf
sub_11F0 endp

include libs/master.lib/check_machine_fmr.asm

; =============== S U B R O U T I N E =======================================

Expand All @@ -2918,7 +2906,7 @@ sub_11FE proc far
; FUNCTION CHUNK AT 11BE SIZE 00000031 BYTES

push cs
call near ptr sub_11F0
call near ptr check_machine_fmr
jz short loc_1215
mov ah, 0Fh
int 10h ; - VIDEO - GET CURRENT VIDEO MODE
Expand Down
20 changes: 4 additions & 16 deletions th05_op.asm
Expand Up @@ -2421,7 +2421,7 @@ sub_F12 endp

loc_F98:
push cs
call near ptr sub_119E
call near ptr check_machine_fmr
jnz short loc_FA3
mov ax, 40h ; '@'
jmp short loc_100F
Expand Down Expand Up @@ -2498,7 +2498,7 @@ loc_100F:

loc_1016:
push cs
call near ptr sub_119E
call near ptr check_machine_fmr
jnz short loc_1022
mov ax, 80h ; '�'
jmp loc_114B
Expand Down Expand Up @@ -2767,19 +2767,7 @@ loc_1199:
; ---------------------------------------------------------------------------
nop

; =============== S U B R O U T I N E =======================================


sub_119E proc far
; sub_11AC-195p ...
mov ax, 0FFFFh
mov es, ax
assume es:nothing
mov ax, 0FC00h
sub ax, es:3
retf
sub_119E endp

include libs/master.lib/check_machine_fmr.asm

; =============== S U B R O U T I N E =======================================

Expand All @@ -2791,7 +2779,7 @@ sub_11AC proc far
; FUNCTION CHUNK AT 116C SIZE 00000031 BYTES

push cs
call near ptr sub_119E
call near ptr check_machine_fmr
jz short loc_11C3
mov ah, 0Fh
int 10h ; - VIDEO - GET CURRENT VIDEO MODE
Expand Down

0 comments on commit cc313d5

Please sign in to comment.