Subversion Repositories SvarDOS

Rev

Rev 983 | Rev 1593 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 983 Rev 987
Line 23... Line 23...
23
 
23
 
24
; Buffer used to remember previous command, when SvarCOM calls the buffered
24
; Buffer used to remember previous command, when SvarCOM calls the buffered
25
; input service at INT 21h,AH=0x0A.
25
; input service at INT 21h,AH=0x0A.
26
; This buffer is right before the stack, so in case of a stack overflow event
26
; This buffer is right before the stack, so in case of a stack overflow event
27
; (for example because of a "too ambitious" TSR) only this buffer is damaged,
27
; (for example because of a "too ambitious" TSR) only this buffer is damaged,
28
; and can be invalidated without much harm.
28
; and can be invalidated without much harm. To detect such damage, SvarCOM's
29
INPUTBUF: times 130 db 0
-
 
30
 
-
 
31
; This stack sig is a guardian value that is checked by the transient part of
29
; transient part is appending a signature at the end of the buffer.
32
; SvarCOM to detect possible stack overflows. If a stack overflow occurs, then
-
 
33
; the INPUTBUFF area above is invalidated and stack signature reverted.
30
INPUTBUF: times 132 db 0 ; 130 bytes for the input buffer + 2 for signature
34
STACKSIG dw 0xCAFE
-
 
35
 
31
 
36
; DOS int 21h functions that I use require at least 40 bytes of stack under
32
; DOS int 21h functions that I use require at least 40 bytes of stack under
37
; DOS-C (FreeDOS) kernel, so here I reserve 64 bytes juste to be sure
33
; DOS-C (FreeDOS) kernel, so here I reserve 64 bytes juste to be sure
38
STACKBUF db "XXX  SVARCOM RMOD BY MATEUSZ VISTE  XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
34
STACKBUF db "XXX  SVARCOM RMOD BY MATEUSZ VISTE  XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
39
STACKPTR dw 0
35
STACKPTR dw 0