Refined the comments in the target start-up files.
Fixed typo errors. Made the comments consistent across all those files.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
|
||||
Start:
|
||||
|
||||
; Save the zero page locations we need
|
||||
; Save the zero-page locations that we need.
|
||||
|
||||
ldx #zpspace-1
|
||||
L1: lda sp,x
|
||||
@@ -29,9 +29,9 @@ L1: lda sp,x
|
||||
dex
|
||||
bpl L1
|
||||
|
||||
; Switch to second charset. The routine that is called by BSOUT to switch the
|
||||
; character set will use FNLEN as temporary storage - YUCK! Since the
|
||||
; initmainargs routine, which parses the command line for arguments needs this
|
||||
; Switch to the second charset. The routine that is called by BSOUT to switch the
|
||||
; character set will use FNLEN as temporary storage -- YUCK! Since the
|
||||
; initmainargs routine, which parses the command line for arguments, needs that
|
||||
; information, we need to save and restore it here.
|
||||
; Thanks to Stefan Haubenthal for this information!
|
||||
|
||||
@@ -43,11 +43,11 @@ L1: lda sp,x
|
||||
pla
|
||||
sta FNLEN ; Restore FNLEN
|
||||
|
||||
; Clear the BSS data
|
||||
; Clear the BSS data.
|
||||
|
||||
jsr zerobss
|
||||
|
||||
; Save system stuff and setup the stack
|
||||
; Save some system stuff; and, set up the stack.
|
||||
|
||||
tsx
|
||||
stx spsave ; Save the system stack ptr
|
||||
@@ -57,20 +57,20 @@ L1: lda sp,x
|
||||
lda MEMSIZE+1
|
||||
sta sp+1 ; Set argument stack ptr
|
||||
|
||||
; Call module constructors
|
||||
; Call the module constructors.
|
||||
|
||||
jsr initlib
|
||||
|
||||
; Push arguments and call main()
|
||||
; Push the command-line arguments; and, call main().
|
||||
|
||||
jsr callmain
|
||||
|
||||
; Call module destructors. This is also the _exit entry.
|
||||
; Call the module destructors. This is also the exit() entry.
|
||||
|
||||
_exit: pha ; Save the return code on stack
|
||||
jsr donelib
|
||||
|
||||
; Copy back the zero page stuff
|
||||
; Copy back the zero-page stuff.
|
||||
|
||||
ldx #zpspace-1
|
||||
L2: lda zpsave,x
|
||||
@@ -78,17 +78,17 @@ L2: lda zpsave,x
|
||||
dex
|
||||
bpl L2
|
||||
|
||||
; Store the program return code into ST
|
||||
; Store the program return code into BASIC's status variable.
|
||||
|
||||
pla
|
||||
sta ST
|
||||
|
||||
; Restore the stack pointer
|
||||
; Restore the stack pointer.
|
||||
|
||||
ldx spsave
|
||||
txs ; Restore stack pointer
|
||||
|
||||
; Back to basic
|
||||
; Back to BASIC.
|
||||
|
||||
rts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user