ReC98/libs/BorlandC/errormsg.asm

35 lines
516 B
NASM
Raw Normal View History

2014-08-20 18:38:08 +00:00
; void __ErrorMessage(const char *msg)
public ___ErrorMessage
___ErrorMessage proc
2014-08-20 18:38:08 +00:00
@@msg = DPTR_ 2 + dPtrSize
push bp
mov bp, sp
push si
push di
if LDATA
push word ptr [bp+@@msg+2]
push word ptr [bp+@@msg]
nopcall _strlen
2014-08-20 18:38:08 +00:00
pop cx
else
push [bp+@@msg]
call _strlen
endif
pop cx
push ax
if LDATA
push word ptr [bp+@@msg+2]
endif
push word ptr [bp+@@msg]
mov al, stderr.fd
cbw
push ax
nopcall __rtl_write
add sp, 4 + dPtrSize
2014-08-20 18:38:08 +00:00
pop di
pop si
pop bp
ret
___ErrorMessage endp