commit 250aecc920a6f12d2d5479a5230a31630dac2a1e parent 086b1d9a47822213dbf68dc7800d9763b1913b8e Author: Devine Lu Linvega <aliceffekt@gmail.com> Date: Mon, 18 Mar 2024 10:46:07 -0700 Updated expansion port example Diffstat:
M | projects/examples/devices/system.expansion.tal | | | 68 | +++++++++++++++++++++++++++++++++++++++++++++++++------------------- |
1 file changed, 49 insertions(+), 19 deletions(-)
diff --git a/projects/examples/devices/system.expansion.tal b/projects/examples/devices/system.expansion.tal @@ -1,26 +1,56 @@ -( usage: uxncli system.expansion.rom ) - -|00 @System &catch $2 &expansion $2 &pad $2 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &halt $1 -|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1 - -|0100 +|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1 +|100 @on-reset ( -> ) - ;cmd .System/expansion DEO2 - ;dst <print-str> + ;buf <pstr> + #2018 DEO + ;buf <pstr> + #0a18 DEO + ( | copy left ) + ;buf #0006 ADD2 ;mmu-cpyl/a STA2 + ;buf #0003 ADD2 ;mmu-cpyl/b STA2 + ;mmu-cpyl .System/expansion DEO2 + ;buf <pstr> + #2018 DEO + ;res1 <pstr> + #0a18 DEO + ( | copy right ) + ;buf #0003 ADD2 ;mmu-cpyr/a STA2 + ;buf #0009 ADD2 ;mmu-cpyr/b STA2 + ;mmu-cpyr .System/expansion DEO2 + ;buf <pstr> + #2018 DEO + ;res2 <pstr> + #0a18 DEO + ( | copy left ) + ;buf #0009 ADD2 ;mmu-cpyl/a STA2 + ;buf #0006 ADD2 ;mmu-cpyl/b STA2 + ;mmu-cpyl .System/expansion DEO2 + ;buf <pstr> + #2018 DEO + ;res3 <pstr> + #0a18 DEO + ( | memset ) + ;buf #0003 ADD2 ;mmu-fill/a STA2 + ;mmu-fill .System/expansion DEO2 + ;buf <pstr> + #2018 DEO + ;res4 <pstr> + #0a18 DEO BRK -@cmd - [ 01 000c 0000 =src 0000 =dst ] - -@src - "Hello 20 "World $1 +@<pstr> ( str* -- ) + LDAk #18 DEO + INC2 LDAk ?<pstr> + POP2 JMP2r -@dst $c +@buf [ "......[hello]..... $1 ] +@res1 [ "...[hello]o]...... $1 ] +@res2 [ "...[hello[hello].. $1 ] +@res3 [ "...[he[hello]lo].. $1 ] +@res4 [ "...-------------.. $1 ] -@<print-str> ( str* -- ) - &w ( -- ) - LDAk #18 DEO - INC2 LDAk ?&w - POP2 JMP2r +@mmu-fill [ 00 000d 0000 &a $2 2d ] +@mmu-cpyl [ 01 0007 0000 &a $2 0000 &b $2 ] +@mmu-cpyr [ 02 0007 0000 &a $2 0000 &b $2 ]