1
0
mirror of https://github.com/mgcaret/of816.git synced 2024-11-04 21:07:09 +00:00
of816/platforms/Neon816/Neon816.s

45 lines
1.1 KiB
ArmAsm
Raw Normal View History

2019-11-21 02:22:11 +00:00
.p816
.a16
.i16
.include "macros.inc"
2019-12-01 08:41:06 +00:00
.include "./Neon816-hw.inc"
2019-11-21 02:22:11 +00:00
.import _Forth_initialize
.import _Forth_ui
.import _system_interface
.pushseg
.segment "FStartup"
.proc startup
clc
xce
2019-12-05 05:18:42 +00:00
phk
plb
2019-12-01 05:09:35 +00:00
rep #SHORT_A|SHORT_I
.a16
.i16
lda #$0000 ; direct page for Forth
2019-11-21 02:22:11 +00:00
tcd
2019-12-05 05:18:42 +00:00
lda #.hiword(Neon_RAM1+$020000) ; top of dictionary memory
2019-11-21 02:22:11 +00:00
pha
2019-12-05 05:18:42 +00:00
lda #.loword(Neon_RAM1+$020000)
2019-11-21 02:22:11 +00:00
pha
2019-12-05 05:18:42 +00:00
lda #.hiword(Neon_RAM1+$010000) ; bottom of dictionary
2019-11-21 02:22:11 +00:00
pha
2019-12-05 05:18:42 +00:00
lda #.loword(Neon_RAM1+$010000)
2019-11-21 02:22:11 +00:00
pha
2019-12-05 05:18:42 +00:00
lda #$0400 ; first usable stack cell (relative to direct page)
2019-11-21 02:22:11 +00:00
pha
2019-12-05 05:18:42 +00:00
lda #$0204 ; last usable stack cell+1 (relative to direct page)
2019-11-21 02:22:11 +00:00
pha
2019-12-05 05:18:42 +00:00
lda #$01EF ; return stack first usable byte
2019-11-21 02:22:11 +00:00
pha
lda #.hiword(_system_interface)
pha
lda #.loword(_system_interface)
pha
jsl _Forth_initialize
jsl _Forth_ui
2019-12-05 05:18:42 +00:00
jmp startup
2019-11-21 02:22:11 +00:00
.endproc
.popseg