-
Notifications
You must be signed in to change notification settings - Fork 7
/
libSaveCommand.asm
46 lines (44 loc) · 977 Bytes
/
libSaveCommand.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
;*******************************************************************************
;* Save Operation *
;*******************************************************************************
;* Syntax : S "(filename)" (dev) (addr) (addr)
;*******************************************************************************
;** save -- syntax :- s (filename) (dev) (addr) (addr) **
COM_SAVE
jsr krljmp_CHRIN$
ldy #0
SAV1
jsr krljmp_CHRIN$
cmp #CHR_Quote
beq SAV2
sta COM_TEXT,y
iny
cpy #16
bne SAV1
jmp ERROR
SAV2
sty COM_L
jsr IBYTE1
tax
lda #1
ldy #1
jsr krljmp_SETLFS$
lda COM_L
ldx #<COM_TEXT
ldy #>COM_TEXT
jsr krljmp_SETNAM$
jsr IBYTE2
sta ADDVEC + 1
stx ADDVEC
jsr IBYTE2
pha
txa
pha
jsr PrintCarrageReturnAndLineFeed
pla
tax
pla
tay
lda #ADDVEC
jsr krljmp_SAVE$
jmp READY