This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

XASM to ASM6

XASM to ASM6
by on (#55394)
Can anyone translate this XASM pseudo-code into proper code?

Code:
buildHuffmanTree_assignCode
   tya
   ldx   literalSymbolCodeLength,y
   ldy:inc   nBitCode_literalOffset,x
   sta   codeToLiteralSymbol,y
   tay
   cpy   #CONTROL_SYMBOLS


specifically the ldy:inc pseudo-op? Does it mean;

ldy nBitCode_literalOffset,x
inc nBitCode_literalOffset,x

?

by on (#55398)
Sounds more like the author made a typo than anything else. There aren't any illegal instructions that combine the LDY and INC instructions either.

by on (#55399)
It's from the download at the bottom of this page.

by on (#55402)
@ dwedit: there's quite a few pseudo-ops/directives in XASM that combine two functions separated by a colon. I just don't seem to be able to find what that particular one is supposed to do.

@ tepples: yep, I'm trying to get some lz7-type decompression and getting that INFLATE code to run in ASM6 seemed like the fastest route. However, it's just outputting zeros at the moment so something is wrong somewhere.....

by on (#55403)
That assembler would do my head in..

From the html file that comes with the assembler..

You may put two instructions in one line so they share the operand. For example:

Code:
 eor:sta foo

is equivalent to

Code:
 eor foo
 sta foo


so its gotta be equiv to

Code:
 ldy nBitCode_literalOffset,x
 inc nBitCode_literalOffset,x