BITMAP ENABLE CLS BLACK READ x, y PLOT x*2, y*2, WHITE WHILE NOT READ END READ x, y EXIT IF x = 99 LINE TO x*2, y*2, WHITE WEND READ x, y PLOT x*2, y*2, WHITE DATA 11,1,10,0,9,0,8,0,7,0,6,0,5,1,4,1,3,2,2,2,1,3,0,4,0,5,1,6,2,7 DATA 3,7,4,7,5,7,6,7,7,6,8,6,9,6,10,6,11,5,12,5,13,5,14,4,15,3,16,3 DATA 17,2,18,1,18,0,17,0,16,0,15,1,14,2,13,3,12,4,12,5,12,6,13,7 DATA 14,7,15,7,16,6,17,6,18,5,19,4,20,4,21,3,22,3,23,3,24,4,23,3 DATA 22,3,21,3,20,4,19,4,18,5,19,6,20,7,21,7,22,7,23,6,24,5,25,4 DATA 26,3,25,4,24,5,23,6,24,7,25,7,26,7,27,6,28,6,29,6,30,5,31,5 DATA 32,4,33,4,34,3,35,4,36,5,35,6,34,7,33,7,32,7,33,7,34,7,35,7 DATA 36,7,37,6,38,6,39,6,40,5,41,5,42,4,43,4,44,3,45,4,46,5,45,6 DATA 44,7,43,7,42,7,43,7,44,7,45,7,46,7,47,6,48,6,49,5,50,4,51,3 DATA 50,4,49,5,48,6,49,7,50,7,51,6,52,6,53,5,54,5,55,4,56,3,57,3 DATA 58,3,59,4,58,3,57,3,56,3,55,4,54,5,54,6,55,7,56,7,57,7,99,99,52,1
The instructions here refer to compiling the example from the command line. For Microsoft Windows users we suggest using UGBASIC-IDE, which allows you to compile the example with just one click.
In order to compile and run the example, you need to have the Altirra emulator, and in particular that the altirra
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.atari test2.bas -o example.xex altirra example.xex # Windows ugbc.atari.exe test2.bas -o example.xex altirra example.xex
In order to compile and run the example, you need to have the Altirra emulator, and in particular that the altirra
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.atarixl test2.bas -o example.xex altirra example.xex # Windows ugbc.atarixl.exe test2.bas -o example.xex altirra example.xex
In order to compile and run the example, you need to have the VICE emulator, and in particular that the x64sc
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.c64 test2.bas -o example.prg x64sc example.prg # Windows ugbc.c64.exe test2.bas -o example.prg x64sc example.prg
In order to compile and run the example, you need to have the VICE emulator, and in particular that the x64sc
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.c64reu test2.bas -o example.prg x64sc -reu example.prg # Windows ugbc.c64reu.exe test2.bas -o example.prg x64sc -reu example.prg
In order to run the example, you need to have the YAPE emulator. In particular that the yape
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.plus4 test2.bas -o example.prg yape example.prg # Windows ugbc.plus4.exe test2.bas -o example.prg yape example.prg
In order to run the example, you need to have the VICE emulator. In particular that the xplus4
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.plus4 test2.bas -o example.prg xplus4 example.prg # Windows ugbc.plus4.exe test2.bas -o example.prg xplus4 example.prg
In order to compile and run the example, you need to have the XROAR emulator, and in particular that the xroar
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.d32 test2.bas -o example.bin xroar -rompath (your rom path) example.bin # Windows ugbc.d32.exe test2.bas -o example.bin xroar.exe -rompath (your rom path) example.bin
In order to compile and run the example, you need to have the XROAR emulator, and in particular that the xroar
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.d64 test2.bas -o example.bin xroar -rompath (your rom path) example.bin # Windows ugbc.d64.exe test2.bas -o example.bin xroar.exe -rompath (your rom path) example.bin
In order to compile and run the example, you need to have the DCMOTO emulator, and in particular that the dcmoto
executable is accessible.
Then, type this command on the command line and on the emulator:
# Linux ugbc.pc128op test2.bas -o example.k7 dcmoto (choose BASIC 128) CLEAR,&H2FFF: LOADM"CASS:",R: EXEC # Windows ugbc.pc128op.exe test2.bas -o example.k7 dcmoto (choose example.k7) (choose BASIC 128) CLEAR,&H2FFF: LOADM"CASS:",R: EXEC
In order to compile and run the example, you need to have the DCMOTO emulator, and in particular that the dcmoto
executable is accessible.
Then, type this command on the command line and on the emulator:
# Linux ugbc.pc128op test2.bas -o example.k7 dcmoto (choose BASIC 128) CLEAR,&H2FFF: LOADM"CASS:",R: EXEC # Windows ugbc.pc128op.exe test2.bas -o example.k7 dcmoto (choose example.k7) (choose BASIC 128) CLEAR,&H2FFF: LOADM"CASS:",R: EXEC
In order to compile and run the example, you need to have the VICE emulator, and in particular that the xvic
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.vic20 test2.bas -o example.prg xvic --memory 24k example.prg # Windows ugbc.vic20.exe test2.bas -o example.prg xvic --memory 24k example.prg
In order to compile and run the example, you need to have the Speccy emulator, and in particular that the speccy
executable is accessible.
Then, type this command on the command line:
# Linux ugbc.zx test2.bas -o example.tap Speccy example.tap # Windows ugbc.zx.exe test2.bas -o example.tap Speccy example.tap
In order to compile and run the example, you need to have the openMsx or the BlueMSX emulator, and in particular that its executable is accessible.
Then, type this command on the command line:
# Linux ugbc.msx1 test2.bas -o example.rom openmsx -cart example.rom # Windows ugbc.msx1.exe test2.bas -o example.rom openmsx -cart example.rom
# Linux ugbc.msx1 test2.bas -o example.rom bluemsx example.rom # Windows ugbc.msx1.exe test2.bas -o example.rom bluemsx example.rom
In order to compile and run the example, you need to have the openMsx or the BlueMSX emulator, and in particular that its executable is accessible.
Then, type this command on the command line:
# Linux ugbc.coleco test2.bas -o example.rom openmsx -machine \"COL - ColecoVision\" -cart example.rom # Windows ugbc.coleco.exe test2.bas -o example.rom bluemsx -machine \"COL - ColecoVision\" example.rom
# Linux ugbc.coleco test2.bas -o example.rom bluemsx /machine \"COL - ColecoVision\" /rom1 example.rom # Windows ugbc.coleco.exe test2.bas -o example.rom bluemsx /machine \"COL - ColecoVision\" /rom1 example.rom
In order to compile and run the example, you need to have the BlueMSX emulator, and in particular that its executable is accessible.
Then, type this command on the command line:
# Linux ugbc.sc3000 test2.bas -o example.rom bluemsx /machine \"SEGA - SC-3000\" /rom1 example.rom # Windows ugbc.sc3000.exe test2.bas -o example.rom bluemsx /machine \"SEGA - SC-3000\" /rom1 example.rom
In order to compile and run the example, you need to have the BlueMSX emulator, and in particular that its executable is accessible.
Then, type this command on the command line:
# Linux ugbc.sg1000 test2.bas -o example.rom bluemsx /machine \"SEGA - SG-1000\" /rom1 example.rom # Windows ugbc.sg1000.exe test2.bas -o example.rom bluemsx /machine \"SEGA - SG-1000\" /rom1 example.rom
If you have found a problem trying to run this example, if you think there is a bug or, more simply, you would like it to be improved, open an issue for this example on GitHub. Thank you!