ReC98/libs/master.lib/ems_setname.asm

62 lines
1006 B
NASM
Raw Normal View History

2014-08-31 08:58:51 +00:00
; master library - PC98 - MSDOS - EMS
;
; Description:
; EMSメモリハンドルに名前をつける
;
; Function/Procedures:
; int ems_setname( unsigned handle, const char * hname );
;
; Parameters:
; unsigned handle EMSハンドル
; char * hname 8bytes,余っている場合は'¥0'で埋めること
;
; Returns:
; 0 ........... success
; 80h〜89h .... failure(EMS エラーコード)
;
; Binding Target:
; Microsoft-C / Turbo-C / Turbo Pascal
;
; Running Target:
; PC-9801
;
; Requiring Resources:
; CPU: 8086
; EMS: LIM EMS 4.0
;
; Notes:
;
;
; Compiler/Assembler:
; TASM 3.0
; OPTASM 1.6
;
; Author:
; 恋塚昭彦
;
; Revision History:
; 92/11/16 Initial
; 92/11/18 bugfix ( thanks, Mikio! )
func EMS_SETNAME
push SI
mov SI,SP
_push DS
; 引数
@@handle = (RETSIZE+1+DATASIZE)*2
@@hname = (RETSIZE+1)*2
mov DX,SS:[SI+@@handle]
_lds SI,SS:[SI+@@hname]
mov AX,5301h ; function: Set Handle Name
int 67h ; call EMM
mov AL,AH
xor AH,AH
_pop DS
pop SI
ret (1+DATASIZE)*2
endfunc