Line trim

This commit is contained in:
neauoire 2022-04-09 13:45:35 -07:00
parent 2396194d9a
commit a3f0d3c839
2 changed files with 34 additions and 4 deletions

View File

@ -2,9 +2,9 @@
[Drifblim](https://wiki.xxiivv.com/drifblim) is a [Uxntal](https://wiki.xxiivv.com/site/uxntal.html) assembler, written in that same language.
The assembler is written in about 400 lines, it's designed to help bootstrap the Uxn ecosystem and to demonstrate the concept of a personal one-page computer concept. The goal is for Driflim's source code to be released as a print-friendly document, along with its assembled hexadecimal data and the napkin definition of the Uxn virtual machine.
The assembler is written in about 400 lines, it's designed to help bootstrap the Uxn ecosystem and to demonstrate the concept of a personal one-page computer concept. The goal is for Driflim's source code to be released as a print-friendly document, along with its assembled hexadecimal data and the _napkin definition_ of the Uxn virtual machine.
The Drifblim project also a REPL program, called the `bicycle`. More on this later.
The Drifblim project also includes a REPL program, called `varvara's bicycle`.
## Build

View File

@ -6,7 +6,6 @@
Display size available
Catch console deo
Display bytes available for labels in boot
Trim lines
)
|00 @System &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2
@ -135,6 +134,15 @@ JMP2r
#0a ;src ;scap JSR2 STA
;src ;log ;scat JSR2
;log ;count-lines JSR2 #0d LTH ,&skip JCN
#00 ;draw-log JSR2
( from* ) ;log #0a ;schr JSR2 INC2
( to* ) ;log
( length* ) ;log #0a ;schr JSR2 ;slen JSR2
;mcpy JSR2
&skip
#01 ;draw-src JSR2
( clear )
#15 .Screen/auto DEO
@ -174,7 +182,7 @@ BRK
( flower )
#0010 .Screen/x DEO2
#001f .Screen/y DEO2
#001d .Screen/y DEO2
#15 .Screen/auto DEO
;flowers-icn #00 ;src ;slen JSR2 ADD #06 DIVk MUL SUB #50 SFT2 ADD2 .Screen/addr DEO2
#81 .Screen/sprite DEO
@ -581,6 +589,17 @@ JMP2r
JMP2r
@mcpy ( from* to* len* -- )
SWP2 STH2
ADD2k NIP2 SWP2
&loop
LDAk STH2kr STA INC2 INC2r
GTH2k ,&loop JCN
POP2 POP2 POP2r
JMP2r
@msfl ( origin* length* -- )
SWP2
@ -600,6 +619,17 @@ JMP2r
JMP2r
@schr ( str* char -- str* )
STH
&while
LDAk STHkr EQU ,&end JCN
INC2 LDAk ,&while JCN
&end
POPr
JMP2r
@slen ( str* -- len* )
DUP2 ,scap JSR SWP2 SUB2