Giter Club home page Giter Club logo

qasm's People

Contributors

ksherlock avatar lroathe avatar lroathe-quicken avatar marketideas avatar

Stargazers

 avatar

Watchers

 avatar

qasm's Issues

qlink and DS \ and ERR \

The DS \ handling needs work. Current logic:

LNK:

  • loads the file
  • stores handle, etc, into a file table
  • handles for DS \ and ERR \ ops
  • builds symbol table entries
  • merging handles together handled by SAV opcode I guess

The DS \ / ERR \ checking:

  • scan reloc table for DS \ and ERR \
  • DS: increases the handle size, moves the relocation records, and inserts fill bytes
  • fill bytes are based on size of the current file, not the segment [WRONG]
  • ends processing after DS \ opcode [WRONG - could be ERR \ after it]
  • Block move to move the relocation table moves count=fill byte count instead of relocation table size [WRONG]

Need to keep track of

  1. current segment size
  2. current file size (for LEN) [ignores DS adjustments]
  3. current position (for POS), which is similar to segment size but can be reset and ignores DS adjustments.

DS \ should do fill bytes based on the current segment size, move relocation size byte

entry symbols

shell -

    ENT symbol1,symbol2,...
    ...
symbol1 ...

```
symbols not being put in the REL file if ENT before the symbol.

label size limits?

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.

```


label equ *

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

da `*`

* 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 

Marinetti issues

HOSTNAME ENT
 STR 'appleiigs'
 DS 1+30-*+HOSTNAME
Illegal relative address in line: 91.
                     91             DS   1+30-*+HOSTNAME 

RASTAN source incompatibilities

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).

spurious misalignment error

	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.

dum segments lose bank information?

(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

pls macro

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 PLAs

PLS x: generate 2x -1 PLAs (??)

file names

errors display a breadcrumb of line number (24 > 136). would be nice if it printed the current file name.

handling @

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)

macro expansion of quoted parameters

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.

first pass errors

errors on the first pass print the line number but not the line, maybe it should print the line as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.