This commit is contained in:
Joshua Bell 2019-01-07 19:36:25 -08:00
parent 7a33b825ba
commit 6c0f888b07
5 changed files with 43 additions and 6 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
out

View File

@ -5,7 +5,7 @@ CCFLAGS = --config apple2-asm.cfg
OUTDIR = out
TARGETS = $(OUTDIR)/path.BIN
TARGETS = $(OUTDIR)/path.BIN $(OUTDIR)/bell.CMD $(OUTDIR)/hello.CMD
.PHONY: clean all
all: $(OUTDIR) $(TARGETS)

9
bell.s Normal file
View File

@ -0,0 +1,9 @@
.include "apple2.inc"
BELL := $FBE4
.org $4000
jsr BELL
rts

18
hello.s Normal file
View File

@ -0,0 +1,18 @@
.include "apple2.inc"
CROUT := $FD8E
COUT := $FDED
.org $4000
ldx #0
: lda str, x
beq done
jsr COUT
jmp :-
done: jsr CROUT
rts
str: .byte "Hello, world!", 0

19
path.s
View File

@ -13,14 +13,26 @@
.include "prodos.inc"
;;; ============================================================
;;;
;;; Installed command memory structure:
;;; * 2 pages - code, path buffer
;;; * 2 pages - I/O buffer
INBUF := $200 ; GETLN input buffer
;;; TODO:
;;; * Dynamically allocate I/O buffer
;;; * Support multi-segment path (e.g. /hd/bin:/hd/extras/bin
;;; * Fail install if on an Integer BASIC machine
;;; * Skip leading spaces
;;; ============================================================
cmd_load_addr := $4000
max_cmd_size = $2000
;;; ============================================================
;;; Monitor ROM routines
;;; Monitor ROM routines/locations
INBUF := $200 ; GETLN input buffer
CROUT := $FD8E
COUT := $FDED
@ -30,7 +42,6 @@ MOVE_SRC := $3C
MOVE_END := $3E
MOVE_DST := $42
TOKEN_NAME_TABLE := $D0D0
CASE_MASK = $DF
@ -41,8 +52,6 @@ CASE_MASK = $DF
.proc installer
ptr := $06
;; TODO: Fail if Applesoft is not in ROM
;; Save previous external command address
lda EXTRNCMD+1
sta next_command