douggilliland / R32V2020

My 32-bit RISC CPU for smallish FPGAs
GNU General Public License v3.0
14 stars 3 forks source link

Assembler Python traceback #59

Closed douggilliland closed 5 years ago

douggilliland commented 5 years ago

@mjgpy3 Not sure yet what line in my code caused this...

C:\Users\HPz420\Documents\GitHub\R32V2020\Programs\Games\G002-Tetris>..\..\..\Assembler\assembler.py G002-Tetris.asm
Traceback (most recent call last):
  File "C:\Users\HPz420\Documents\GitHub\R32V2020\Assembler\assembler.py", line 734, in <module>
    for data in constant.resolveHex():
  File "C:\Users\HPz420\Documents\GitHub\R32V2020\Assembler\assembler.py", line 287, in resolveHex
    return [int(self.longToken, 16)]
ValueError: invalid literal for int() with base 16: ''
mjgpy3 commented 5 years ago

@douggilliland could you share the tetris code?

douggilliland commented 5 years ago

@mjgpy3 Just pushed in Games folder

douggilliland commented 5 years ago

@mjgpy3 It usually makes a list file and when it does I can often find the error there. This one didn't update the list file at all. Weird.

douggilliland commented 5 years ago

Maybe it died here?

setScreenLocation_XGA:
    push    r8
    push    r9
    lix     DAR,screenX.lower

nope...

douggilliland commented 5 years ago

@mjgpy3 Found workaround. It likes: screenX: .LONG 0x0 It hates: screenX: .LONG 0

mjgpy3 commented 5 years ago

@douggilliland should shorts and bytes be allowed as normal integers too?

mjgpy3 commented 5 years ago

@douggilliland I'm going to close this for now as I believe I've fixed it for longs. If we want it fixed for shorts and bytes let's open another issue :)