From 250aecc920a6f12d2d5479a5230a31630dac2a1e Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 18 Mar 2024 10:46:07 -0700 Subject: [PATCH] Updated expansion port example --- .../examples/devices/system.expansion.tal | 70 +++++++++++++------ 1 file changed, 50 insertions(+), 20 deletions(-) diff --git a/projects/examples/devices/system.expansion.tal b/projects/examples/devices/system.expansion.tal index 2cafa83..7d2a85e 100644 --- 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 + ;buf + #2018 DEO + ;buf + #0a18 DEO + ( | copy left ) + ;buf #0006 ADD2 ;mmu-cpyl/a STA2 + ;buf #0003 ADD2 ;mmu-cpyl/b STA2 + ;mmu-cpyl .System/expansion DEO2 + ;buf + #2018 DEO + ;res1 + #0a18 DEO + ( | copy right ) + ;buf #0003 ADD2 ;mmu-cpyr/a STA2 + ;buf #0009 ADD2 ;mmu-cpyr/b STA2 + ;mmu-cpyr .System/expansion DEO2 + ;buf + #2018 DEO + ;res2 + #0a18 DEO + ( | copy left ) + ;buf #0009 ADD2 ;mmu-cpyl/a STA2 + ;buf #0006 ADD2 ;mmu-cpyl/b STA2 + ;mmu-cpyl .System/expansion DEO2 + ;buf + #2018 DEO + ;res3 + #0a18 DEO + ( | memset ) + ;buf #0003 ADD2 ;mmu-fill/a STA2 + ;mmu-fill .System/expansion DEO2 + ;buf + #2018 DEO + ;res4 + #0a18 DEO BRK -@cmd - [ 01 000c 0000 =src 0000 =dst ] - -@src - "Hello 20 "World $1 - -@dst $c - -@ ( str* -- ) - &w ( -- ) - LDAk #18 DEO - INC2 LDAk ?&w +@ ( str* -- ) + LDAk #18 DEO + INC2 LDAk ? POP2 JMP2r +@buf [ "......[hello]..... $1 ] +@res1 [ "...[hello]o]...... $1 ] +@res2 [ "...[hello[hello].. $1 ] +@res3 [ "...[he[hello]lo].. $1 ] +@res4 [ "...-------------.. $1 ] + +@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 ] +