mirror of
https://github.com/fadden/6502bench.git
synced 2024-11-05 06:04:36 +00:00
1759317c8c
Defined a simple monochrome bitmap format, and created some pieces for a Tic-Tac-Toe game. Wrote a tutorial that explains how to visualize them. Also, updated some comments.
81 lines
4.3 KiB
ArmAsm
81 lines
4.3 KiB
ArmAsm
; Copyright 2019 faddenSoft. All Rights Reserved.
|
|
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
|
;
|
|
; Assembler: Merlin 32
|
|
|
|
org $1000
|
|
|
|
ENTRY
|
|
lda bitmapX
|
|
lda bitmapO
|
|
lda bitmapBoard
|
|
rts
|
|
|
|
; Each pixel is represented by a single bit. Leftmost pixel is in high bit.
|
|
|
|
bitmapX ;1x8
|
|
dfb %10000010 ; X.....X.
|
|
dfb %01000100 ; .X...X..
|
|
dfb %00101000 ; ..X.X...
|
|
dfb %00010000 ; ...X....
|
|
dfb %00101000 ; ..X.X...
|
|
dfb %01000100 ; .X...X..
|
|
dfb %10000010 ; X.....X.
|
|
dfb %00000000 ; ........
|
|
|
|
bitmapO ;1x8
|
|
dfb %00111000 ; ..OOO...
|
|
dfb %01000100 ; .O...O..
|
|
dfb %10000010 ; O.....O.
|
|
dfb %10000010 ; O.....O.
|
|
dfb %10000010 ; O.....O.
|
|
dfb %01000100 ; .O...O..
|
|
dfb %00111000 ; ..OOO...
|
|
dfb %00000000 ; ........
|
|
|
|
bitmapBoard ;5x40, stride=8
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex fffffffffeCCCCCC ; ######## ######## ######## ######## #######.
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 00fe00fe00CCCCCC ; ........ #######. ........ #######. ........
|
|
hex 0000000000CCCCCC ; ........ ........ ........ ........ ........
|