Subversion Repositories SvarDOS

Rev

Rev 2161 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2161 Rev 2162
Line 223... Line 223...
223
int 0x21
223
int 0x21
224
 
224
 
225
; if all went well, jump back to start
225
; if all went well, jump back to start
226
jnc skipsig
226
jnc skipsig
227
 
227
 
228
; save error code into cl
-
 
229
mov cl, al
-
 
230
 
-
 
231
; display program name (in DS:DX), but first replace its nul terminator by a $
228
; display program name (in DS:DX), but first replace its nul terminator by a $
232
;mov si, dx           ; done already before the exec attempt
229
;mov si, dx           ; done already before the exec attempt
233
PARSENEXTBYTE:
230
PARSENEXTBYTE:
234
lodsb ; load byte at DS:SI into AL and inc SI (direction flag is clear already)
231
lodsb ; load byte at DS:SI into AL and inc SI (direction flag is clear already)
235
test al, al  ; is zero yet?
232
test al, al  ; is zero yet?
236
jnz PARSENEXTBYTE
233
jnz PARSENEXTBYTE
-
 
234
dec si               ; lodsb incremented si so it was pointing one byte too far
237
mov [si], byte '$'   ; replace the nul terminator by a $ and display it
235
mov [si], byte '$'   ; replace the nul terminator by a $ and display it
238
mov ah, 0x09
236
mov ah, 0x09
239
int 0x21
237
int 0x21
240
mov [si], byte 0     ; revert the nul terminator back to its place
238
mov [si], byte 0     ; revert the nul terminator back to its place
241
 
239
 
Line 459... Line 457...
459
;          50H (set PSP address)
457
;          50H (set PSP address)
460
;          51H and 62H (query PSP address)
458
;          51H and 62H (query PSP address)
461
;          59H (get extended error information)
459
;          59H (get extended error information)
462
;
460
;
463
; =============================================================================
461
; =============================================================================
464
HANDLER_24H:    ; +465h
462
HANDLER_24H:    ; +464h
465
 
463
 
466
; save registers so I can restore them later. AX does not require saving.
464
; save registers so I can restore them later. AX does not require saving.
467
; Microsoft documentation says:
465
; Microsoft documentation says:
468
;  "When it is desired to ignore an error, the same registers must be preserved
466
;  "When it is desired to ignore an error, the same registers must be preserved
469
;   as when it is desired to retry the operation (SS,SP,DS,BX,CX,DX)."
467
;   as when it is desired to retry the operation (SS,SP,DS,BX,CX,DX)."