mirror of https://github.com/nmlgc/ReC98.git
[Reduction] #413: ems_movememoryregion
This commit is contained in:
parent
958f32c884
commit
3660316127
|
@ -0,0 +1,55 @@
|
|||
; master library - PC98 - MSDOS - EMS
|
||||
;
|
||||
; Description:
|
||||
; EMSメモリと主メモリなどの間でデータを転送する
|
||||
;
|
||||
; Function/Procedures:
|
||||
; int ems_movememoryregion( struct const EMS_move_source_dest * block ) ;
|
||||
;
|
||||
; Parameters:
|
||||
; struct .. * block パラメータブロック
|
||||
;
|
||||
; Returns:
|
||||
; 0 ........... success
|
||||
; 80h〜 ....... failure(EMS エラーコード)
|
||||
;
|
||||
; Binding Target:
|
||||
; Microsoft-C / Turbo-C / Turbo Pascal
|
||||
;
|
||||
; Running Target:
|
||||
; PC-9801
|
||||
;
|
||||
; Requiring Resources:
|
||||
; CPU: 8086
|
||||
; EMS: LIM EMS 4.0
|
||||
;
|
||||
; Notes:
|
||||
; ・NEC の EMSドライバは、このファンクションによって segment B000hの
|
||||
; メモリを VRAMでなく設定してしまいます。
|
||||
; 実行後、ems_enablepageframe()によって VRAMに戻して下さい。
|
||||
;
|
||||
; Compiler/Assembler:
|
||||
; TASM 3.0
|
||||
; OPTASM 1.6
|
||||
;
|
||||
; Author:
|
||||
; 恋塚昭彦
|
||||
;
|
||||
; Revision History:
|
||||
; 92/11/16 Initial
|
||||
|
||||
func EMS_MOVEMEMORYREGION
|
||||
push SI
|
||||
mov SI,SP
|
||||
|
||||
_push DS
|
||||
_lds SI,SS:[SI+(RETSIZE+1)*2]
|
||||
mov AX,5700h
|
||||
int 67h
|
||||
mov AL,AH
|
||||
xor AH,AH
|
||||
|
||||
_pop DS
|
||||
pop SI
|
||||
ret DATASIZE*2
|
||||
endfunc
|
|
@ -1810,8 +1810,7 @@ arg_C = word ptr 12h
|
|||
push ss
|
||||
lea ax, [bp+var_12]
|
||||
push ax
|
||||
push cs
|
||||
call near ptr sub_41C6
|
||||
call ems_movememoryregion
|
||||
push ax
|
||||
sub ax, ax
|
||||
push ax
|
||||
|
@ -1826,27 +1825,7 @@ include libs/master.lib/ems_allocate.asm
|
|||
include libs/master.lib/ems_enablepageframe.asm
|
||||
include libs/master.lib/ems_exist.asm
|
||||
include libs/master.lib/ems_free.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
|
||||
sub_41C6 proc far
|
||||
push si
|
||||
mov si, sp
|
||||
push ds
|
||||
lds si, ss:[si+6]
|
||||
mov ax, 5700h
|
||||
int 67h ; - LIM EMS 4.0 - MOVE/EXCHANGE MEMORY REGION
|
||||
; AL = 00h move memory region / 01h exchange memory region
|
||||
; DS:SI -> structure describing source and destination
|
||||
; Return: AH = status
|
||||
mov al, ah
|
||||
xor ah, ah
|
||||
pop ds
|
||||
pop si
|
||||
retf 4
|
||||
sub_41C6 endp
|
||||
|
||||
include libs/master.lib/ems_movememoryregion.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
|
@ -1923,8 +1902,7 @@ arg_C = word ptr 12h
|
|||
push ss
|
||||
lea ax, [bp+var_12]
|
||||
push ax
|
||||
push cs
|
||||
call near ptr sub_41C6
|
||||
call ems_movememoryregion
|
||||
push ax
|
||||
sub ax, ax
|
||||
push ax
|
||||
|
|
|
@ -1296,8 +1296,7 @@ arg_C = word ptr 12h
|
|||
push ss
|
||||
lea ax, [bp+var_12]
|
||||
push ax
|
||||
push cs
|
||||
call near ptr sub_403C
|
||||
call ems_movememoryregion
|
||||
push ax
|
||||
sub ax, ax
|
||||
push ax
|
||||
|
@ -1312,27 +1311,7 @@ include libs/master.lib/ems_allocate.asm
|
|||
include libs/master.lib/ems_enablepageframe.asm
|
||||
include libs/master.lib/ems_exist.asm
|
||||
include libs/master.lib/ems_free.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
|
||||
sub_403C proc far
|
||||
push si
|
||||
mov si, sp
|
||||
push ds
|
||||
lds si, ss:[si+6]
|
||||
mov ax, 5700h
|
||||
int 67h ; - LIM EMS 4.0 - MOVE/EXCHANGE MEMORY REGION
|
||||
; AL = 00h move memory region / 01h exchange memory region
|
||||
; DS:SI -> structure describing source and destination
|
||||
; Return: AH = status
|
||||
mov al, ah
|
||||
xor ah, ah
|
||||
pop ds
|
||||
pop si
|
||||
retf 4
|
||||
sub_403C endp
|
||||
|
||||
include libs/master.lib/ems_movememoryregion.asm
|
||||
|
||||
; =============== S U B R O U T I N E =======================================
|
||||
|
||||
|
@ -1409,8 +1388,7 @@ arg_C = word ptr 12h
|
|||
push ss
|
||||
lea ax, [bp+var_12]
|
||||
push ax
|
||||
push cs
|
||||
call near ptr sub_403C
|
||||
call ems_movememoryregion
|
||||
push ax
|
||||
sub ax, ax
|
||||
push ax
|
||||
|
|
Loading…
Reference in New Issue