mirror of
https://github.com/a2stuff/prodos-path.git
synced 2024-06-10 00:29:57 +00:00
works
This commit is contained in:
parent
f9a63cea8b
commit
55daa9a905
5
hello.s
5
hello.s
|
@ -6,10 +6,13 @@ COUT := $FDED
|
||||||
|
|
||||||
.org $4000
|
.org $4000
|
||||||
|
|
||||||
|
jsr CROUT
|
||||||
ldx #0
|
ldx #0
|
||||||
: lda str, x
|
: lda str,x
|
||||||
beq done
|
beq done
|
||||||
|
ora #$80
|
||||||
jsr COUT
|
jsr COUT
|
||||||
|
inx
|
||||||
jmp :-
|
jmp :-
|
||||||
|
|
||||||
done: jsr CROUT
|
done: jsr CROUT
|
||||||
|
|
18
path.s
18
path.s
|
@ -9,7 +9,6 @@
|
||||||
.org $2000
|
.org $2000
|
||||||
|
|
||||||
.include "apple2.inc"
|
.include "apple2.inc"
|
||||||
.include "apple2.mac"
|
|
||||||
.include "prodos.inc"
|
.include "prodos.inc"
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
@ -135,7 +134,7 @@ CASE_MASK = $DF
|
||||||
|
|
||||||
nxtchr: lda INBUF,x
|
nxtchr: lda INBUF,x
|
||||||
page_num6 := *+2 ; address needing updating
|
page_num6 := *+2 ; address needing updating
|
||||||
jsr to_upper
|
jsr to_upper_ascii
|
||||||
|
|
||||||
page_num1 := *+2 ; address needing updating
|
page_num1 := *+2 ; address needing updating
|
||||||
cmp command_string,x
|
cmp command_string,x
|
||||||
|
@ -181,11 +180,11 @@ check_if_token:
|
||||||
;; Ensure it's alpha
|
;; Ensure it's alpha
|
||||||
lda INBUF
|
lda INBUF
|
||||||
page_num7 := *+2 ; address needing updating
|
page_num7 := *+2 ; address needing updating
|
||||||
jsr to_upper
|
jsr to_upper_ascii
|
||||||
|
|
||||||
cmp #'A'|$80
|
cmp #'A'
|
||||||
bcc not_ours
|
bcc not_ours
|
||||||
cmp #('Z'+1)|$80
|
cmp #'Z'+1
|
||||||
bcs not_ours
|
bcs not_ours
|
||||||
|
|
||||||
;; Check if it's a BASIC token. Based on the AppleSoft BASIC source.
|
;; Check if it's a BASIC token. Based on the AppleSoft BASIC source.
|
||||||
|
@ -210,7 +209,7 @@ mloop: iny ; Advance through token table
|
||||||
next_char:
|
next_char:
|
||||||
lda INBUF,x ; Next character
|
lda INBUF,x ; Next character
|
||||||
page_num8 := *+2 ; address needing updating
|
page_num8 := *+2 ; address needing updating
|
||||||
jsr to_upper
|
jsr to_upper_ascii
|
||||||
|
|
||||||
;; NOTE: Does not skip over spaces, unlike BASIC tokenizer
|
;; NOTE: Does not skip over spaces, unlike BASIC tokenizer
|
||||||
|
|
||||||
|
@ -436,8 +435,9 @@ set_path:
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; Helpers
|
;;; Helpers
|
||||||
|
|
||||||
.proc to_upper
|
.proc to_upper_ascii
|
||||||
cmp #'a'|$80
|
and #$7F
|
||||||
|
cmp #'a'
|
||||||
bcc skip
|
bcc skip
|
||||||
and #CASE_MASK
|
and #CASE_MASK
|
||||||
skip: rts
|
skip: rts
|
||||||
|
@ -447,7 +447,7 @@ skip: rts
|
||||||
;;; Data
|
;;; Data
|
||||||
|
|
||||||
command_string:
|
command_string:
|
||||||
scrcode "PATH"
|
.byte "PATH"
|
||||||
command_length = *-command_string
|
command_length = *-command_string
|
||||||
|
|
||||||
path_buffer:
|
path_buffer:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user