📄 rxdosini.asm
字号:
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
processFCBS_24:
getdarg dx, ax, _FCBS ; return FCBS
getdarg es, di, _ConfigStatements ;
Return
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Process Files Statement(s) ;
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
; ;
; es:di start of statements in saved config buffer ;
;...............................................................;
processFiles:
Entry
ddef _ConfigStatements, es, di
def _files, DEFAULT_FILES
def _fcbs, ax
processFiles_08:
mov ax, CONFIGTYPE_FILES
call _findStatementType ; find statement type
jc processFiles_24 ; if no more -->
push es
push di
lea di, offset [ configStatement ][ di ]
call ConfigPrompt ; check for ?= or F8 case
jc processFiles_12 ; if ignore -->
mov cx, 1
mov dx, CONFIGMAX_FILES
call _getNumber
jc processFiles_12 ; if beyond range -->
storarg _files, ax ; else ok to save
processFiles_12:
pop di
pop es
or word ptr es:[ configFlags ][ di ], CONFIGFLAG_PROCESSED
add di, word ptr es:[ configLength ][ di ]
jmp processFiles_08
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
processFiles_24:
getarg ax, _files ; return files
add ax, word ptr [ _fcbs ][ bp ]
call RxDOSini_SFTSubSystem ; init SFTs
getdarg es, di, _ConfigStatements ;
Return
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Process Last Drive ;
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
; ;
; es:di start of statements in saved config buffer ;
;...............................................................;
processLastDrive:
Entry
ddef _ConfigStatements, es, di
def _LastDrive, DEFAULT_LASTDRIVE
processLastDrive_08:
mov ax, CONFIGTYPE_LASTDRIVE
call _findStatementType ; find statement type
jc processLastDrive_24 ; if no more -->
push es
push di
lea di, offset [ configStatement ][ di ]
call ConfigPrompt ; check for ?= or F8 case
jc processLastDrive_12 ; if ignore -->
xor ax, ax
mov al, byte ptr es:[ di ]
call upperCase
cmp al, 'A'
jc processLastDrive_12
cmp al, 'Z'+1
jnc processLastDrive_12
storarg _LastDrive, ax
processLastDrive_12:
pop di
pop es
or word ptr es:[ configFlags ][ di ], CONFIGFLAG_PROCESSED
add di, word ptr es:[ configLength ][ di ]
jmp processLastDrive_08
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
processLastDrive_24:
getarg ax, _LastDrive ; get last drive info, if any
and ax, 1Fh
mov byte ptr [ _RxDOS_bLastDrive ], al ; save in DOS
call RxDOSini_DPBSubSystem ; (order important)
call RxDOSini_CDSSubSystem ; init drives/current dirs
getdarg es, di, _ConfigStatements ;
Return
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Process NumLock Statement ;
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
; ;
; es:di start of statements in saved config buffer ;
;...............................................................;
processNumLock:
Entry
ddef _ConfigStatements, es, di
def _numlock, -1 ; 0 is off; 1 is on.
processNumLock_08:
mov ax, CONFIGTYPE_NUMLOCK
call _findStatementType ; find statement type
jc processNumLock_24 ; if no more -->
push es
push di
lea di, offset [ configStatement ][ di ]
call ConfigPrompt ; check for ?= or F8 case
jc processNumLock_12 ; if ignore -->
mov si, offset _RxDOS_ConfigOnOff
call _findCommand ; locate on or off
jc processNumLock_12 ; if none of the above -->
storarg _numlock, dx ; else ok to save
processNumLock_12:
pop di
pop es
or word ptr es:[ configFlags ][ di ], CONFIGFLAG_PROCESSED
add di, word ptr es:[ configLength ][ di ]
jmp processNumLock_08
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
processNumLock_24:
push es
getarg ax, _numlock ; get numlock
cmp ax, -1 ; any change ?
jz processNumLock_46 ; if no change -->
mov bx, 40h
mov es, bx ; BIOS communications area
mov bx, offset _BIOS_KeyboardFlags ; keyboard status flags
or ax, ax ; set num lock ?
jnz processNumLock_32 ; if set -->
and byte ptr es:[ bx ], NOT ( _BIOS_KB_NumLock )
jmp short processNumLock_46
processNumLock_32:
or byte ptr es:[ bx ], _BIOS_KB_NumLock
processNumLock_46:
pop es
getdarg es, di, _ConfigStatements
Return
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Process Shell Statement ;
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
; ;
; es:di start of statements in saved config buffer ;
;...............................................................;
processShell:
Entry
ddef _ConfigStatements, es, di
processShell_08:
mov ax, CONFIGTYPE_SHELL
call _findStatementType ; find statement type
jc processShell_24 ; if no more -->
push es
push di
lea di, offset [ configStatement ][ di ]
call ConfigPrompt ; check for ?= or F8 case
jc processShell_12 ; if ignore -->
push es
push di
push ds
mov bx, offset _RxDOSini_CommandShell
push bx
call CopyString
processShell_12:
pop di
pop es
or word ptr es:[ configFlags ][ di ], CONFIGFLAG_PROCESSED
add di, word ptr es:[ configLength ][ di ]
jmp processShell_08
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
processShell_24:
getdarg es, di, _ConfigStatements ;
Return
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Process Stack Statement(s) ;
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
; ;
; es:di start of statements in saved config buffer ;
;...............................................................;
processStack:
Entry
ddef _ConfigStatements, es, di
ddef _stacks, 0, DEFAULT_STACKS
processStack_08:
mov ax, CONFIGTYPE_STACKS
call _findStatementType ; find statement type
jc processStack_24 ; if no more -->
push es
push di
lea di, offset [ configStatement ][ di ]
call ConfigPrompt ; check for ?= or F8 case
jc processStack_16 ; if ignore -->
mov cx, CONFIGMIN_STACKS_X
mov dx, CONFIGMAX_STACKS_X
call _getNumber
jc processStack_16 ; if beyond range -->
mov word ptr [ _stacks. _low ][ bp ], ax ; else ok to save
mov cx, CONFIGMIN_STACKS_Y
mov dx, CONFIGMAX_STACKS_Y
call _getNumber
jc processStack_16 ; if beyond range -->
mov word ptr [ _stacks. _high ][ bp ], ax ; else ok to save
processStack_16:
pop di
pop es
or word ptr es:[ configFlags ][ di ], CONFIGFLAG_PROCESSED
add di, word ptr es:[ configLength ][ di ]
jmp processStack_08
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
processStack_24:
getdarg dx, ax, _stacks ; return stacks
getdarg es, di, _ConfigStatements ;
Return
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Process Switch Char ;
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
; ;
; es:di start of statements in saved config buffer ;
;...............................................................;
processSwitchChar:
Entry
ddef _ConfigStatements, es, di
def _SwitchChar, '/'
processSwitchChar_08:
mov ax, CONFIGTYPE_SWITCHCHAR
call _findStatementType ; find statement type
jc processSwitchChar_24 ; if no more -->
xor ax, ax
mov al, byte ptr es:[ configStatement ][ di ]
storarg _SwitchChar, ax ; save last drive info
or word ptr es:[ configFlags ][ di ], CONFIGFLAG_PROCESSED
add di, word ptr es:[ configLength ][ di ]
jmp processSwitchChar_08
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
; return
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
processSwitchChar_24:
getarg ax, _SwitchChar ; get last drive info, if any
mov byte ptr [ _RxDOS_bSwitchChar ], al
getdarg es, di, _ConfigStatements ;
Return
;''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''';
; Remove Comments, Leading Blanks, Blank Lines ;
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -;
; ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -