(uxndis) Display labels in literals

This commit is contained in:
Devine Lu Linvega 2024-06-11 07:47:17 -08:00
parent 809302fe92
commit d1e009e4a8
2 changed files with 18 additions and 20 deletions

View File

@ -21,7 +21,7 @@ install: all
uninstall:
@ rm -f ${DIR}/${ID}.rom
archive: all
@ cp src/${ID}.tal ../oscean/etc/${ID}.tal.txt
@ cp src/${ID}.tal ../../../oscean/etc/${ID}.tal.txt
.PHONY: all clean lint run install uninstall archive

View File

@ -57,6 +57,7 @@
@<print-line> ( addr* -- addr* )
( ) DUP2 ;rom SUB2
( ) DUP2 #0100 ADD2 find-sym DUP2 #ffff EQU2 ?{
#0a18 DEO
[ LIT2 "@ 18 ] DEO
DUP2 <pstr>
#0a18 DEO }
@ -92,7 +93,6 @@
JMP2r
@<print-opcode> ( addr* -- addr* )
( | print hex )
LDAk ?{ <print-1-byte>
;opcodes/brk !<pstr> }
LDAk #9f AND ?{
@ -104,41 +104,39 @@
LDAk DUP #80 NEQ SWP #c0 NEQ AND ?{
<print-2-byte>
;opcodes <pstr>
<print-mode>/no-keep
LDAk #80 EOR <print-mode>
#2018 DEO
INC2 LDAk !<phex>/b }
LDAk DUP #a0 NEQ SWP #e0 NEQ AND ?{
<print-3-byte>
;opcodes <pstr>
<print-mode>/no-keep
LDAk #80 EOR <print-mode>
#2018 DEO
INC2 LDA2k <phex>
INC2 LDA2k find-sym DUP2 #ffff EQU2 ?{ <pstr>
INC2 JMP2r }
POP2 LDA2k <phex>
INC2 JMP2r }
<print-1-byte>
LDAk #1f AND #00 SWP #20 SFT2 ;opcodes ADD2 <pstr>
LDAk
( >> )
@<print-mode> ( addr* -- )
LDAk #80 AND #00 EQU ?{
[ LIT2 "k 18 ] DEO }
&no-keep ( addr* -- )
LDAk #20 AND #00 EQU ?{
@<print-mode> ( byte -- )
DUP #20 AND #00 EQU ?{
[ LIT2 "2 18 ] DEO }
LDAk #40 AND #00 EQU ?{
DUP #80 AND #00 EQU ?{
[ LIT2 "k 18 ] DEO }
#40 AND #00 EQU ?{
[ LIT2 "r 18 ] DEO }
JMP2r
@<print-rel> ( addr* value* -- )
( | find sym )
SWP2 ;rom SUB2 #0103 ADD2 OVR2 ADD2 find-sym
( ) DUP2 #ffff NEQ2 ?<print-dst>
POP2
( | resume )
OVR #80 AND ?<pdec>
( ) INC2k ORA ?{
POP2 OVR #80 AND ?<pdec>
[ LIT2 "+ 18 ] DEO
!<pdec>
@<print-dst> ( addr* sym* -- )
!<pdec> }
NIP2 !<pstr>
@<print-pad> ( count -- )
@ -201,7 +199,7 @@
( name ) "Uxndis 0a
( desc ) "Uxntal 20 "Disassembler 0a
( auth ) "By 20 "Devine 20 "Lu 20 "Linvega 0a
( date ) "10 20 "Jun 20 "2024 $2
( date ) "11 20 "Jun 20 "2024 $2
@opcodes [
"LIT 00 "INC 00 "POP 00 "NIP 00