home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RBBS in a Box Volume 1 #3.1
/
RBBSIABOX31.cdr
/
craz
/
commod.txt
< prev
next >
Wrap
Text File
|
1985-03-16
|
7KB
|
325 lines
a 1ed
;this file contains the code to modify command.com in several ways
; 1) increases command.com's size by 1k and intercepts the command processor
; (see PC August 7,1984 "Get SET for Speed")
;
; 2) adds 4 Resident commands to command.com
; these commands are:
; i) a utility to switch from 80col. mono to 40
; col. color. This command is invoked by
; type s <space> <return> at the Dos prompt.
; Note that there must be a space following
; the letter s. After this command is entered
; the active screen will change over to the unactive
; one.
;
; ii) a modified file deletion routine similar to
; VDEL.COM. The command is invoked by typing
; d <space> drive id. (not neccessary) file
; deliminators <return> at the Dos prompt.
; For example d b:*.bas Files which have the
; attribute Read Only will generate the error
; message 'Access Denied' and will not be deleted.
;
; iii) a utility to change the attribute of files
; between Read/Write and Read Only, or Hidden
; and Unhidden, or System and Non-System. The
; command is invoked by typing a <space> 'x' filespec
; at the Dos prompt. The 'x' must be replaced by
; one of the following valid commands.
; c - current attributes of file
; r - toggle Read/Write / Read Only
; h - toggle Hidden/Unhidden
; s - toggle System/Non-System
;
; For example. a c command.com
; will display the current attributes of command.com
;
; iv) a utility to beep the speaker. Invoked by typing
; b <space> <return>. For use in batch files
; the b <space> must be followed by any character.
; This is to keep the <space> after the b from
; being truncated.
;
; **** To add these commands to command.com type the following at the
; Dos prompt
; DEBUG COMMAND.COM < COMMOD.TXT <return>
;
; At the current time I have not documented this modification. If anyone
;has any questions drop me a message. If anyone has any specs. on making
;this modification DOS 2.1 compatible please let me know! This shouldn't
;be too hard - all that is required is the addresses for making command.com
;larger.
;
;NOTE: For anyone examining the code they will note that all references to
;data areas are smaller by hex 10C0. This is not a bug - it is like this due
;the way command.com loads.
;
; Mike Cumming
; 94 Aldershot Blvd
; Wpg, Man.
; Compuserve 70376,466
;
add dx,3270 ; this set of code increases command.com's size
a 3ad
cmp bx,3b0
a 3cd
sub bx,390
a 691
mov cx,37be
a 6a9
cmp cx,37be
a c9d
sub ax,390
a 140b
call 4030
m 4030 4580 4430
f 4030 442f 0
r cx
4900
a 4030
MOV SI,2B8B ; This section of code intercepts the command
CLD ; processor and decides whether any action
LODSB ; should be taken
PUSH AX
LODSB
CMP AL,20
POP AX
JNZ 405F
AND AL,DF
CMP AL,53
JZ 4077
CMP AL,44
JZ 40A3
CMP AL,41
JZ 4066
CMP AL,42
JZ 4070
CMP AL,FF
JZ 406D
CMP AL,FF
JZ 4072
JMP 405E
MOV DI,2B8B
MOV AX,0D0D
STOSW
PUSH CS
POP ES
MOV CX,0886
JMP CX
JMP 4160
NOP
NOP
NOP
NOP
NOP
NOP
NOP
JMP 425E
NOP
NOP
NOP
NOP
a 4077
PUSH DS ; this section of code switches screens
MOV AX,0040
MOV DS,AX
MOV AL,[0010]
PUSH AX
AND AL,30
CMP AL,30
POP AX
JZ 4094
OR AL,30
MOV [0010],AL
MOV AX,0007
INT 10
JMP 40A0
AND AL,CF
OR AL,20
MOV [0010],AL
MOV AX,0001
INT 10
POP DS
JMP 4058
a 40a3
MOV DX,2C4F ; this is the random delete code
MOV AH,1A
INT 21
MOV SI,2B8D
LODSB
CMP AL,0D
JNZ 40AD
MOV DI,SI
SUB DI,01
MOV AL,00
STOSB
MOV DX,2B8D
MOV AH,4E
INT 21
JB 40F1
MOV DX,305B
MOV AH,09
INT 21
MOV SI,2C6D
LODSB
CMP AL,00
JZ 40DA
MOV DL,AL
MOV AH,02
INT 21
JMP 40CD
MOV DX,3066
MOV AH,09
INT 21
MOV AH,01
INT 21
AND AL,DF
CMP AL,59
JZ 40FB
MOV AH,4F
INT 21
JMP 40C1
MOV DX,3070
MOV AH,09
INT 21
JMP 4058
MOV SI,2C6D
MOV DI,2B8F
LODSB
STOSB
CMP AL,00
JNZ 4101
JMP 424E
MOV AH,41
INT 21
JB 4112
JMP 40EB
MOV AH,09
MOV DX,308E
INT 21
JMP 40EB
a 4160
MOV SI,2B8F ; this code alters attribute bytes of files
LODSB
CMP AL,0D
JNZ 4163
MOV AL,00
MOV [SI-01],AL
MOV DX,2B8F
MOV AH,43
INT 21
JB 41DE
MOV AL,[2B8D]
AND AL,DF
CMP AL,43
JZ 419D
CMP AL,52
JNZ 4187
XOR CX,0001
CMP AL,53
JNZ 418F
XOR CX,0004
CMP AL,48
JNZ 4197
XOR CX,0002
MOV AL,01
MOV AH,43
INT 21
MOV AH,09
MOV BX,CX
AND BX,00FE
CMP BX,CX
JZ 41AE
MOV DX,313E
JMP 41B1
MOV DX,314B
INT 21
MOV BX,CX
AND BX,00FD
CMP BX,CX
JZ 41C2
MOV DX,315A
JMP 41C5
MOV DX,3165
INT 21
MOV BX,CX
AND BX,00FB
CMP BX,CX
JZ 41D6
MOV DX,3172
JMP 41D9
MOV DX,317E
INT 21
JMP 4058
MOV DX,3128
MOV AH,09
INT 21
JMP 4058
a 424e
MOV DX,2B8D ; these few lines are to fix a small bug that
MOV AL,[2B8E] ; was in the random delete. It was placed here
CMP AL,3A ; because of the difficulty of moving all the
JZ 425B ; code that was above it
MOV DX,2B8F
JMP 410A
a 425e
MOV BX,05DC ; this code beeps the speaker
IN AL,61
PUSH AX
AND AL,FC
OUT 61,AL
MOV CX,0032
LOOP 426B
OR AL,02
OUT 61,AL
MOV CX,0032
LOOP 4274
DEC BX
JNZ 4264
POP AX
OUT 61,AL
JMP 4058
;the following data is for error messages etc.
e 411B
0D 0A 0A 44 65
e 4120
6C 65 74 65 20 24 20 28 79 2F 6E 29 20 3F 20 24
e 4130
0D 0A 0A 4E 6F 20 6D 6F 72 65 20 6D 61 74 63 68
e 4140
69 6E 67 20 66 69 6C 65 73 2E 0D 0A 0A 24 20 20
e 4150
07 41 63 63 65 73 73 20 44 65 6E 69 65 64 2E 24
e 41E8
0A 0A 0D 46 69 6C 65 20
e 41F0
6E 6F 74 20 66 6F 75 6E 64 0D 0A 0A 24 0D 0A 52
e 4200
65 61 64 20 4F 6E 6C 79 20 20 24 0D 0A 52 65 61
e 4210
64 2F 57 72 69 74 65 20 20 24 0D 0A 48 69 64 64
e 4220
65 6E 20 20 24 0D 0A 55 6E 48 69 64 64 65 6E 20
e 4230
20 24 0D 0A 53 79 73 74 65 6D 0D 0A 0A 24 0D 0A
e 4240
4E 6F 6E 2D 53 79 73 74 65 6D 0D 0A 0A 24
w
q