home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
dos
/
prg
/
bas
/
hanlin3
/
qbwiz20
/
errlevel.asm
< prev
next >
Wrap
Assembly Source File
|
1992-07-13
|
1KB
|
40 lines
comment #
+----------------------------------------------------------------------+
| |
| QBWiz Copyright (c) 1990-1992 Thomas G. Hanlin III |
| |
| QuickBasic Access Library |
| |
+----------------------------------------------------------------------+
#
public ERRLEVEL
extrn B$terminate: byte
.model medium
.code
ERRLEVEL proc ; set error level
mov bx,sp
mov ax,4[bx]
mov bx,offset B$terminate
mov cx,seg B$terminate
mov es,cx
mov byte ptr es:-3[bx],0B8h ; store opcode for "MOV AX,immed"
mov es:-2[bx],ax ; store immediate value
ret 2
ERRLEVEL endp ; set error level
end