forked from OldSkoolCoder/CIDOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathincChangeDirectoryCommand.asm
31 lines (25 loc) · 1.23 KB
/
incChangeDirectoryCommand.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
;*******************************************************************************
;* ChangeDIR Routine *
;* Syntax : Switchdir or s shifted W 'Directory Name' *
;*******************************************************************************
CHANGEDIR
jsr CHRGOT ; Check For Characters
bne CDIR_GetDirectoryName; Characters, Jump To Inform
jmp SYNTAX_ERROR ; No Characters Found, Send Syntax Error
CDIR_GetDirectoryName
ldy #0 ; Init DOS Buffer Index
lda #"c" ; Load Mount Disk Command
sta DosCommandBuffer,y ; Store it in DOS Buffer
iny ; Increas Index
lda #"d" ; Load Mount Disk Command
sta DosCommandBuffer,y ; Store it in DOS Buffer
iny ; increase index
lda #CHR_Colon ; Loads ':'
sta DosCommandBuffer,y ; Store it in DOS Buffer
iny ; Increase Index
CHRGETSpaceCheck 255
GetFilenameFromCommandLine DosCommandBuffer
;lda #47 ; Loads '/'
;sta DosCommandBuffer,y ; Store it in DOS Buffer
;iny ; Increase Index
jmp DOS