vhelin / wla-dx

WLA DX - Yet Another GB-Z80/Z80/Z80N/6502/65C02/65CE02/65816/68000/6800/6801/6809/8008/8080/HUC6280/SPC-700/SuperFX Multi Platform Cross Assembler Package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect output for .dsb with calculated values

maxim-zhao opened this issue · comments

commented

Example code:

.dsb 16, <label
.dsb 16, <definition
.dsb 16, definition & 0xff
.dsb 16, 1 + 2

.define definition $6789
label:

Assume this is assembled at .org 0 so label = $0040. I would expect to see (hex):

40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 
89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 
89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 89 
03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 

I actually get:

CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 40 
89 CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
89 CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 C3

Which looks like three different things are happening...

WLA DX build is git hash efdaca2.

Argh, it seems that all .DS*'s pospone only one pending calculation to WLALINK per .DS* - a clear design flaw. Pretty amazing how long this issue has existed - from the very beginning. I'll try to fix this asap!