Subversion Repositories SvarDOS

Rev

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

Rev 580 Rev 983
Line 17... Line 17...
17
 
17
 
18
                 ; offset
18
                 ; offset
19
SIG1 dw 0x1983   ;  +0
19
SIG1 dw 0x1983   ;  +0
20
SIG2 dw 0x1985   ;  +2
20
SIG2 dw 0x1985   ;  +2
21
SIG3 dw 0x2017   ;  +4
21
SIG3 dw 0x2017   ;  +4
22
SIG4 dw 0x2019   ;  +6  this acts also as a guardval to detect stack overflows
22
SIG4 dw 0x2019   ;  +6  acts also as a guardval to detect severe stack overflows
-
 
23
 
-
 
24
; Buffer used to remember previous command, when SvarCOM calls the buffered
-
 
25
; input service at INT 21h,AH=0x0A.
-
 
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,
-
 
28
; and can be invalidated without much harm.
-
 
29
INPUTBUF: times 130 db 0
-
 
30
 
-
 
31
; This stack sig is a guardian value that is checked by the transient part of
-
 
32
; SvarCOM to detect possible stack overflows. If a stack overflow occurs, then
-
 
33
; the INPUTBUFF area above is invalidated and stack signature reverted.
-
 
34
STACKSIG dw 0xCAFE
23
 
35
 
24
; DOS int 21h functions that I use require at least 40 bytes of stack under
36
; DOS int 21h functions that I use require at least 40 bytes of stack under
25
; DOS-C (FreeDOS) kernel, so here I reserve 64 bytes juste to be sure
37
; DOS-C (FreeDOS) kernel, so here I reserve 64 bytes juste to be sure
26
STACKBUF db "XXX  SVARCOM RMOD BY MATEUSZ VISTE  XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
38
STACKBUF db "XXX  SVARCOM RMOD BY MATEUSZ VISTE  XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
27
STACKPTR dw 0
39
STACKPTR dw 0