ksherlock / qasm Goto Github PK
View Code? Open in Web Editor NEWThis project forked from marketideas/qasm
Merlin 8/16/16+ Compatible 6502/65816 assembler/linker suite in C++ for linux
License: Other
This project forked from marketideas/qasm
Merlin 8/16/16+ Compatible 6502/65816 assembler/linker suite in C++ for linux
License: Other
*
needs to be reset after each da/dw/db/etc argument.
merlin:
1
008000: 14 00 12 00 2 da offset-*,offset-*
008004: 00 00 00 00 3 ds 16
008008: 00 00 00 00 00 00 00 00
008010: 00 00 00 00
4 offset
5
qasm:
1
008000: 14 00 14 00 2 da offset-*,offset-*
008004: 00 00 00 00 3 ds 16
008008: 00 00 00 00 00 00 00 00
008010: 00 00 00 00
4 offset
5
rel
* ext a
jmp a
b
Undefined label in line: 3.
3 jmp a
Misalignment in line: 4.
4 b
adding an a
label (real or ext) eliminates the misalignment error.
qasm I.UDP.S
n.b. - only compiles if PLS macro (from RJBUTILS.MAC.S) is commented out...
TCP.EQU.S:
Assembling I.UDP.S
Assembling.
Duplicate label in line: 37 >134.
Duplicate label in line: 37 >164.
Duplicate label in line: 37 >165.
Duplicate label in line: 37 >166.
Misalignment in line: 37 >164.
>164 tcpDGMSICMPECHORQOUTADRL0 ;ICMP ECHORQ replies sent out
Misalignment in line: 37 >165.
>165 tcpDGMSICMPECHORPADRL0 ;ICMP ECHORPs in
Misalignment in line: 37 >166.
>166 tcpDGMSICMPECHORPBADIDADRL0 ;ICMP ECHORPs unclaimed
Misalignment in line: 37 >168.
>168 tcpDGMSUDP ADRL 0 ;UDPs OK (added to UDP queue)
Object saved as I.UDP.L,A$0185,L$0204,LNK
End of QuickASM assembly. 516 bytes, 8 errors, 2467 lines, 617 symbols.
Elapsed time = < 1 second.
```
merlin seems to allow duplicate absolute labels if the value match.
bleh = 1
bleh = 1
label equ *
is equivalent to label
, however label equ *
doesn't introduce a new global scope (for :lables
) in qasm.
bleh equ *
:local
another equ *
:local ; duplicate label in qasm, ok in merlin
seems to cause a hang.
shell -
ENT symbol1,symbol2,...
...
symbol1 ...
```
symbols not being put in the REL file if ENT before the symbol.
HOSTNAME ENT
STR 'appleiigs'
DS 1+30-*+HOSTNAME
Illegal relative address in line: 91.
91 DS 1+30-*+HOSTNAME
Bad address mode in line: 1.
1 pea #','
merlin has special treatment for the @
character within a LUP
- it's replaced with A-Z. (if > 26 loops, will generate a label error).
Outside of a LUP, @
by itself is a hidden character. (need to verify again as my recollection isn't complete)
should asm error bump the link error count?
errors on the first pass print the line number but not the line, maybe it should print the line as well.
(QA Tools)
qasetcmdtbl
lda 7,s
stal cmdtbl
lda 9,s
stal cmdtbl+2
lda 5,s
sta 5+4,s
lda 3,s
sta 3+4,s
lda 1,s
sta 1+4,s
pla
pla
brl noerror
...
DS_Start
dum * ;allocated by loader
cmdline ds 256
cmdhandle ds 4 ;handle to command table
cmdtbl ds 4 ;ptr to the internal cmd table
...
generated, loaded code:
12/558e: a3 07 LDA $07,s
12/5590: 8f e6 c3 00 STA $00c3e6
12/5594: a3 09 LDA $09,s
12/5596: 8f e8 c3 00 STA $00c3e8
12/559a: a3 05 LDA $05,s
12/559c: 83 09 STA $09,s
getvars
in asm.cond.s
'
and "
are both macro parameter delimiters, but they can't be embedded within each other since it screws up the parameter counting mechanism.
rastan source code uses dw ^$00
merlin apparently treats that as the unary ^ operator. qasm treats it as a label character.
dw #^$00
is a workaround for qasm
^ is a legitimate label character (thanks, merlin).
errors display a breadcrumb of line number (24 > 136
). would be nice if it printed the current file name.
PLS MAC
do ]0
LUP ]1
PLA
else
PLA
fin
--^
<<<
PLS
: error (with do ]0)
PLS 0
: error
PLS 1
: generates 1 PLA
PLS 2
: generates 3 PLA
s
PLS x
: generate 2x -1 PLA
s (??)
No warning when segment size > $ffff
The DS \ handling needs work. Current logic:
LNK:
The DS \ / ERR \ checking:
Need to keep track of
DS \ should do fill bytes based on the current segment size, move relocation size byte
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.