************************************************************************** * CHICKEN.ASM * Program to play the game "chicken" on the LCD/keypad. ************************************************************************** #include "registers.asm" ; Equates for the HC11 org $2000 ; Locate us in external RAM jmp main ; Jump to main routine. #include "random.asm" ; Random-number generator. #include "lcd.asm" ; LCD (Liquid-Crystal Display) code. #include "graphics.asm" ; Game graphics. #include "keypad.asm" ; Keypad code. #include "game.asm" ; Game state. #include "debug.asm" ; For debugging routines. *================================================================================== * Main program. *=================================================================================== debug2: fcc "starting main program" fcb EOT * Start of program. main: ldx #debug2 jsr printmsg jsr init_LCD ; Initialize the LCD display jsr init_keypad ; Setup Keypad jsr store_glyphs ; Store some custom character glyphs in the CGRAM. jsr seedtime ; Seed random number generator with current time. jsr init_game ; Initialize everything for a new game jsr game_loop ; Enter main game loop rts ; game exit, return from main *================================= * END OF PROGRAM: CHICKEN.ASM *=================================