Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
; 8x8 Playfield of TeleBall
; can be used as an inspiration of actually doing an 8x8 TeleBall on QNICE :-)
; needs VGA
; done by sy2002 in January 2017
#include "../dist_kit/sysdef.asm"
#include "../dist_kit/monitor.def"
.ORG 0x8000
SYSCALL(vga_cls, 1)
MOVE VGA$STATE, R0
MOVE VGA$CR_X, R1
MOVE VGA$CR_Y, R2
MOVE VGA$CHAR, R3
MOVE VGA$EN_HW_CURSOR, R4 ; switch off cursor
NOT R4, R4
AND R4, @R0
MOVE 10, @R2 ; y pos
MOVE TELEBALL, R6
Y_LOOP MOVE 20, @R1 ; x pos
X_LOOP MOVE @R6++, @R3 ; print char
ADD 1, @R1
CMP @R1, 30
RBRA X_LOOP, !Z
ADD 1, @R2
CMP @R2, 20
RBRA Y_LOOP, !Z
SYSCALL(getc, 1) ; wait for a key
NOT R4, R4 ; switch on cursor
OR R4, @R0
SYSCALL(exit, 1)
TELEBALL
.DW 0x86, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8C
.DW 0x85, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x85
.DW 0x85, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x85
.DW 0x85, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x85
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x85
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x85
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6F, 0x20, 0x20, 0x85
.DW 0x85, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x85
.DW 0x85, 0x20, 0x20, 0x9A, 0x9A, 0x20, 0x20, 0x20, 0x20, 0x85
.DW 0x83, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x8A, 0x89
b1fb36c56This file is pinned to the selected release. Download the original to open it in your design tool.