mirror of https://git.sr.ht/~rabbits/drifblim
Minor optimization
This commit is contained in:
parent
0cdf7aa99f
commit
7bdba67d00
|
@ -4,7 +4,12 @@
|
|||
|
||||
It is meant to be as small as it could possibly be made. The goal would be for it to be in the 1kb range. It will not support macros and includes. Instead, a pre-processor rom might be considered.
|
||||
|
||||
_Drifblim is strong enough to lift Pokémon or people but has no control over its flight. This causes it to drift with the wind and end up anywhere._
|
||||
The Drifblim project also includes:
|
||||
|
||||
- `drifblim-tga.rom`: Creates a grayscale tga image of a binary file.
|
||||
- `drifblim-hex.rom`: Creates a hex dump text file of a binary file.
|
||||
|
||||
**Warning**: This assembler does not currently checks for out-of-bounds relative literals.
|
||||
|
||||
## Build
|
||||
|
||||
|
@ -17,3 +22,5 @@ uxnemu etc/move.rom
|
|||
```
|
||||
|
||||
If do not wish to assemble it yourself, you can download [drifblim.rom](https://rabbits.srht.site/drifblim/drifblim.rom).
|
||||
|
||||
_Drifblim is strong enough to lift Pokémon or people but has no control over its flight. This causes it to drift with the wind and end up anywhere._
|
|
@ -1,7 +1,5 @@
|
|||
( uxnasm etc/hello.tal hello.rom )
|
||||
|
||||
|80 @test
|
||||
|
||||
|0100 @program
|
||||
|
||||
;hello-word
|
||||
|
@ -16,5 +14,3 @@
|
|||
BRK
|
||||
|
||||
@hello-word "Hello 20 "World! 00
|
||||
|
||||
,test
|
||||
|
|
|
@ -77,10 +77,12 @@ BRK
|
|||
POP2r
|
||||
|
||||
JMP2r
|
||||
&on-litzp STH2r NIP STH2r LDA2 ;dst ADD2 STA POP2 JMP2r
|
||||
&on-litrel STH2r STH2kr LDA2 SUB2 #0002 SUB2 NIP STH2r LDA2 ;dst ADD2 STA POP2 JMP2r
|
||||
&on-litabs STH2r STH2r LDA2 ;dst ADD2 STA2 POP2 JMP2r
|
||||
&on-rawabs STH2r STH2r LDA2 ;dst ADD2 STA2 POP2 JMP2r
|
||||
&on-litzp STH2r NIP STH2r ,&set-byte JMP
|
||||
&on-litrel STH2r STH2kr LDA2 SUB2 #0002 SUB2 NIP STH2r
|
||||
&set-byte LDA2 ;dst ADD2 STA POP2 JMP2r
|
||||
&on-litabs STH2r STH2r ,&set-short JMP
|
||||
&on-rawabs STH2r STH2r
|
||||
&set-short LDA2 ;dst ADD2 STA2 POP2 JMP2r
|
||||
|
||||
@find-label ( name* -- addr* )
|
||||
|
||||
|
|
Loading…
Reference in New Issue