Subversion Repositories SvarDOS

Rev

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

Rev 349 Rev 350
Line 11... Line 11...
11
CPU 8086
11
CPU 8086
12
org 0h           ; this is meant to be executed without a PSP
12
org 0h           ; this is meant to be executed without a PSP
13
 
13
 
14
section .text    ; all goes into code segment
14
section .text    ; all goes into code segment
15
 
15
 
-
 
16
                 ; offset
-
 
17
SIG1 dw 0x1983   ;  +0
-
 
18
SIG2 dw 0x1985   ;  +2
-
 
19
SIG3 dw 0x2017   ;  +4
-
 
20
SIG4 dw 0x2019   ;  +6
-
 
21
 
-
 
22
; environment segment - this is updated by SvarCOM at init time
16
jmp short skipsig
23
ENVSEG   dw 0    ;  +8
-
 
24
 
-
 
25
; input buffer used for the "previous command" history
-
 
26
BUF000 db 128, 0 ; +0Ah
-
 
27
BUF064 db "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
-
 
28
BUF128 db "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
17
 
29
 
18
SIG1 dw 0x1983
-
 
19
SIG2 dw 0x1985
-
 
20
SIG3 dw 0x2017
-
 
21
SIG4 dw 0x2019
-
 
22
 
-
 
23
; service routine: used by the transient part of svarcom, returns:
-
 
24
; AX = offset of input buffer history block
-
 
25
; BX = offset where environment's segment is stored (patched at install time)
-
 
26
inputroutine:
-
 
27
mov ax, BUF000
-
 
28
mov bx, ENVSEG
-
 
29
retf
-
 
30
 
30
 
31
skipsig:
31
skipsig:         ; +8Ch
32
 
32
 
33
; set up CS=DS=SS and point SP to my private stack buffer
33
; set up CS=DS=SS and point SP to my private stack buffer
34
mov ax, cs
34
mov ax, cs
35
mov ds, ax
35
mov ds, ax
36
mov es, ax
36
mov es, ax
37
mov ss, ax
37
mov ss, ax
38
mov sp, STACKPTR
38
mov sp, STACKPTR
39
 
39
 
40
; prepare the exec param block
40
; prepare the exec param block
-
 
41
mov ax, [ENVSEG]
41
;mov [EXEC_PARAM_REC], word 0
42
mov [EXEC_PARAM_REC], ax
42
mov ax, COMSPEC
43
mov ax, COMSPEC
43
mov [EXEC_PARAM_REC+2], ax
44
mov [EXEC_PARAM_REC+2], ax
44
mov [EXEC_PARAM_REC+4], ds
45
mov [EXEC_PARAM_REC+4], ds
45
 
46
 
46
; execute command.com
47
; execute command.com
Line 81... Line 82...
81
ERRLOAD db "ERR x, FAILED TO LOAD COMMAND.COM FROM:", 13, 10
82
ERRLOAD db "ERR x, FAILED TO LOAD COMMAND.COM FROM:", 13, 10
82
 
83
 
83
COMSPEC db "C:\SVN\SVARDOS\SVARCOM\COMMAND.COM"
84
COMSPEC db "C:\SVN\SVARDOS\SVARCOM\COMMAND.COM"
84
COMSPCZ db 0
85
COMSPCZ db 0
85
 
86
 
86
; input buffer used for the "previous command" history
-
 
87
BUF000 db 128, 0
-
 
88
BUF064 db "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
-
 
89
BUF128 db "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
-
 
90
 
-
 
91
; FreeDOS int 21h functions that I use require at least 32 bytes of stack,
87
; FreeDOS int 21h functions that I use require at least 32 bytes of stack,
92
; here I allocate 64 bytes to be sure
88
; here I allocate 64 bytes to be sure
93
STACKBUF db "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
89
STACKBUF db "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
94
STACKPTR db "xx"
90
STACKPTR db "xx"
95
 
-
 
96
; environment segment - this is updated by SvarCOM at init time
-
 
97
ENVSEG   dw 0
-