Hello, I'm a newbie tinkering with the Spectrum.
I tried to get some code to test like the classic 'clock.bas' or 'circle. bas' and then converting a .bas file to .tap.
In some cases, I obtain some errors like:
manuelzompetta@Manuels-MacBook-Pro zxbasic % python zxbc.py clock.bas
clock.bas:21: warning: [W100] Using default implicit type 'float' for 'a'
clock.bas:22: warning: [W100] Using default implicit type 'float' for 'sx'
clock.bas:22: warning: [W100] Using default implicit type 'float' for 'sy'
clock.bas:25: warning: [W100] Using default implicit type 'ulong' for 't2'
Traceback (most recent call last):
File "/Users/manuelzompetta/Downloads/zxbasic/zxbc.py", line 12, in <module>
sys.exit(zxbc.main()) # Exit
^^^^^^^^^^^
File "/Users/manuelzompetta/Downloads/zxbasic/src/zxbc/zxbc.py", line 155, in main
asm_output = backend.emit(optimize=OPTIONS.optimization_level > 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manuelzompetta/Downloads/zxbasic/src/arch/z80/backend/main.py", line 770, in emit
self._output_join(output, self._QUAD_TABLE[quad.instr].func(quad), optimize=optimize)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manuelzompetta/Downloads/zxbasic/src/arch/z80/backend/generic.py", line 362, in _cast
output.extend(to_long(tA))
^^^^^^^^^^^
File "/Users/manuelzompetta/Downloads/zxbasic/src/arch/z80/backend/common.py", line 401, in to_long
raise NotImplementedError(f"type conversion from {stype} to long is undefined")
NotImplementedError: type conversion from u32 to long is undefined
In other cases I obtain .tap file but when I execute it in the Spectrum or in an emulator nothing happens, I just obtain the welcome screen.
What I'm doing wrong?
Thanks
I tried to get some code to test like the classic 'clock.bas' or 'circle. bas' and then converting a .bas file to .tap.
In some cases, I obtain some errors like:
manuelzompetta@Manuels-MacBook-Pro zxbasic % python zxbc.py clock.bas
clock.bas:21: warning: [W100] Using default implicit type 'float' for 'a'
clock.bas:22: warning: [W100] Using default implicit type 'float' for 'sx'
clock.bas:22: warning: [W100] Using default implicit type 'float' for 'sy'
clock.bas:25: warning: [W100] Using default implicit type 'ulong' for 't2'
Traceback (most recent call last):
File "/Users/manuelzompetta/Downloads/zxbasic/zxbc.py", line 12, in <module>
sys.exit(zxbc.main()) # Exit
^^^^^^^^^^^
File "/Users/manuelzompetta/Downloads/zxbasic/src/zxbc/zxbc.py", line 155, in main
asm_output = backend.emit(optimize=OPTIONS.optimization_level > 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manuelzompetta/Downloads/zxbasic/src/arch/z80/backend/main.py", line 770, in emit
self._output_join(output, self._QUAD_TABLE[quad.instr].func(quad), optimize=optimize)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/manuelzompetta/Downloads/zxbasic/src/arch/z80/backend/generic.py", line 362, in _cast
output.extend(to_long(tA))
^^^^^^^^^^^
File "/Users/manuelzompetta/Downloads/zxbasic/src/arch/z80/backend/common.py", line 401, in to_long
raise NotImplementedError(f"type conversion from {stype} to long is undefined")
NotImplementedError: type conversion from u32 to long is undefined
In other cases I obtain .tap file but when I execute it in the Spectrum or in an emulator nothing happens, I just obtain the welcome screen.
What I'm doing wrong?
Thanks