Subversion Repositories SvarDOS

Rev

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

Rev 450 Rev 459
Line 7... Line 7...
7
; this is installed in memory by the transient part of SvarCOM. it has only
7
; this is installed in memory by the transient part of SvarCOM. it has only
8
; two jobs: providing a resident buffer for command history, environment, etc
8
; two jobs: providing a resident buffer for command history, environment, etc
9
; and respawning COMMAND.COM whenever necessary.
9
; and respawning COMMAND.COM whenever necessary.
10
 
10
 
11
CPU 8086
11
CPU 8086
-
 
12
org 0x100
-
 
13
 
12
org 0h           ; this is meant to be executed without a PSP
14
PSP_ENVSEG equ 0x2C
13
 
15
 
14
section .text    ; all goes into code segment
16
section .text    ; all goes into code segment
15
 
17
 
16
                 ; offset
18
                 ; offset
17
SIG1 dw 0x1983   ;  +0
19
SIG1 dw 0x1983   ;  +0
Line 52... Line 54...
52
mov dx, COMSPECBOOT
54
mov dx, COMSPECBOOT
53
 
55
 
54
; do I have a valid COMSPEC?
56
; do I have a valid COMSPEC?
55
or [COMSPECPTR], word 0
57
or [COMSPECPTR], word 0
56
jz USEDEFAULTCOMSPEC
58
jz USEDEFAULTCOMSPEC
57
; set ES:DX to actual COMSPEC
59
; set ES:DX to actual COMSPEC (in env segment)
58
mov es, [ENVSEG]
60
mov es, [PSP_ENVSEG]
59
mov dx, [COMSPECPTR]
61
mov dx, [COMSPECPTR]
60
USEDEFAULTCOMSPEC:
62
USEDEFAULTCOMSPEC:
61
 
63
 
62
; prepare the exec param block
64
; prepare the exec param block
63
mov ax, [ENVSEG]
65
mov ax, [PSP_ENVSEG]
64
mov [EXEC_PARAM_REC], ax
66
mov [EXEC_PARAM_REC], ax
65
mov ax, CMDTAIL
67
mov ax, CMDTAIL
66
mov [EXEC_PARAM_REC+2], ax
68
mov [EXEC_PARAM_REC+2], ax
67
mov [EXEC_PARAM_REC+4], cs
69
mov [EXEC_PARAM_REC+4], cs
68
 
70