BBS: Inland Empire Archive Date: 12-08-92 (20:22) Number: 367 From: ROB MCKEE Refer#: NONE To: ALL Recvd: NO Subj: Errorlevel Conf: (2) Quik_Bas
Hi All, To fix a Error on my part.. Hi All, n ErrLvl.com RCX 4c ; Oooppsssss I had it 1 short... a MOV AX,054B ; Point to Segment PUSH DS ; Save Data Seg MOV DS,AX ; Load new Data Segment MOV AL,[0003] ; Get Errorlevel POP DS ; Restore Data Segment JMP 0113 ; Jmp around Data DB 00 00 00 0D 0A 24 00 ; Working Data MOV [0112],AL ; Save Errorlevel CMP AL,00 ; Is it 0 don't need to Divide then JZ 012F ; If 0 skip Divide XOR AH,AH ; 0 out Remainder MOV BL,0A ; Set Divisor DIV BL ; Divide MOV [010E],AH ; Save the 1's digit XOR AH,AH ; 0 out Remainder DIV BL ; Divide MOV [010D],AH ; Save the 10's digit MOV [010C],AL ; Save the 100's digit MOV DX,010C ; Set start of string MOV AH,09 ; Load for Output String Func ADD BYTE PTR [010C],30 ; Add 30h to make it Ascii # ADD BYTE PTR [010D],30 ; Add 30h to make it Ascii # ADD BYTE PTR [010E],30 ; Add 30h to make it Ascii # INT 21 ; Output the String MOV AL,[0112] ; Get the ERRORLEVEL again MOV AH,4C ; Setup for Exit with ERRORLEVEL INT 21 ; ByeBye... w q ------------------------------ 8< --------------------------- AS you can see, it Exit's with the same Errorlevel that it had coming into it. I have a listing of the Dos 3.x Master List but I don't know if it's the same as Dos 5. If I can intercept the ErrorLevel inside Qbas then I can replace alot of 'IF ERRORLEVEL statements in my Bat Files and do more things in my Bat files. TTYL -Rob --- EZPoint V2.1 * Origin: Flyer Proof Computer Services V# 510-237-8091 (1:125/1212.13) TTYL -Rob
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET