Skip to content

Commit

Permalink
add constant for BASIC start address
Browse files Browse the repository at this point in the history
  • Loading branch information
rhalkyard committed Dec 8, 2020
1 parent 61b6f33 commit 837d1a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions durexforth.asm
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@
!set TARGET = 128

!if TARGET = 128 {
* = $1c01
BASIC_START = $1c01
} else {
* = $0801
BASIC_START = $0801
}

* = BASIC_START

!byte $b, $08, $a, 0
!byte $9E ; SYS
!byte '0' + entry % 10000 / 1000 ; entrypoint address as decimal digits
Expand Down Expand Up @@ -192,6 +194,9 @@ ONE
!src "lowercase.asm"
!src "disk.asm"

+BACKLINK "basic-start", 11
+VALUE BASIC_START

+BACKLINK "native-c128?", 12
!if TARGET = 128 {
+VALUE 1
Expand Down
2 changes: 1 addition & 1 deletion forth_src/base.fs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ include turnkey
cr
.( cart: )
$4000 $68 -
here $1c01 - top latest -
here basic-start - top latest -
$21 + + -
. .( bytes remain.) cr

Expand Down
2 changes: 1 addition & 1 deletion forth_src/turnkey.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ start @ to oldstart
top to oldtop
['] restore-forth start !
here $20 + top latest - + top!
$1c01 top 1+ $d word count saveb ;
basic-start top 1+ $d word count saveb ;

: save-prg ( strptr strlen -- )
here 0 , top to latest top!
Expand Down

0 comments on commit 837d1a4

Please sign in to comment.