A83: Won't work
[Prev][Next][Index][Thread]
A83: Won't work
Please help me. This doesn't work. The car is supposed to move up and down with
the keys. Just press something until the screen clears. Press clear (the exit
key) and on and the weirdest thing will happen.
---------------------------------------
Michael Cook
MBCook@MBCook.com (website related)
ICQ: 1145861
---------------------------------------
www.MBCook.com (Main Site)
www.MBCook.com/netsmart.html (NetSmart Homepage)
---------------------------------------
E-Mail for PGP key
---------------------------------------
I pledge allegiance to the compatibles of IBM, and to the developers for which
it stands, one platform, under Bill, indestructible, with peripherals and
multimedia for all.
.NOLIST
#define equ .equ
#define EQU .equ
#define end .end
#define X 8265h
#include "ti83asm.inc" ; Needed Files
#include "tokens.inc"
LIST
.org 9327h ; Start of program
Start:
call _RUNINDICOFF ; Turn off the run indicator
ld a, 28
ld (X), a ; Starting X
Main:
call _CLRLCDFULL ; Clear the screen
call _GRBUFCLR ; Clear the graph buffer
call Car_Sprite ; Show the car
call _GRBUFCPY_V ; Show the graph buffer
call _GETKEY ; Get a key
cp 03h ; Is it up?
jp z, Up
cp 03h ; Is it down?
jp z, Down
cp 09h ; Is it [clear]?
jp z, Quit
jp nz, Main ; Nothing happened
Up:
ld a, (X) ; Get X
dec a ; Decrease it
cp 0 ; Make shure we're in limits
jp z, Main
ld (X), a ; We're in so save it
jp Main ; Done here
Down:
ld a, (X) ; Get X
inc a ; Decrease it
cp 58 ; Make shure we're in limits
jp z, Main
ld (X), a ; We're in so save it
jp Main ; Done here
Car_Sprite:
push hl
ld a, (X) ; Get X
ld c, a
ld b, 0 ; Store it and Y
ld hl, Car1 ; Show back
call DRWSPR
ld a, (X) ; Get X
ld c, a
ld b, 8 ; Store it and Y
ld hl, Car2 ; Show front
call DRWSPR
pop hl ; get a var
ret ; Done here
About:
call _CLRLCDFULL ; Clear the screen
set textInverse, (iy+textflags) ; Make the text reversed
call _HOMEUP ; Set position
ld hl, About_Title ; Set string
call _PUTS ; Show title
res textInverse, (iy+textflags) ; Fix text to normal
ld a, 6
ld (CURCOL), a ; Set column
ld a, 2
ld (CURROW), a ; Set row
ld hl, By ; Set string
call _PUTS ; Show string
ld a, 26
ld (PENCOL), a ; Set column
ld a, 31
ld (PENROW), a ; Set row
ld hl, Name ; Set string
call _VPUTS ; Show string
ld a, 12
ld (PENCOL), a ; Set column
ld a, 37
ld (PENROW), a ; Set row
ld hl, E_Mail ; Set string
call _VPUTS ; Show string
ld a, 18
ld (PENCOL), a ; Set column
ld a, 43
ld (PENROW), a ; Set row
ld hl, Web_Page ; Set string
call _VPUTS ; Show string
ld a, 2
ld (CURCOL), a ; Set column
ld a, 7
ld (CURROW), a ; Set row
ld hl, Enter ; Set string
call _PUTS ; Show string
call _GETKEY ; Get a key
cp 05h ; Is it 'Enter'?
jp Start
Quit:
set appTextSave, (iy+appFlags) ; Make shure that we clear the backup
call _CLRSCRNFULL ; Clear the screen
res appTextSave, (iy+appFlags) ; Always reset flags
call _HOMEUP
ei ; Make shure interupts are on
ret ; Exit
#include "drwspr.z80" ; Sprite routine 2 (A,E) in HL
Car1:
.db 00001111b ; Car sprite (back)
.db 00010010b
.db 00010100b
.db 00010100b
.db 00010100b
.db 00010100b
.db 00010010b
.db 00001111b
Car2:
.db 11110000b ; Car sprite (front)
.db 01001000b
.db 00100100b
.db 00100100b
.db 00100100b
.db 00100100b
.db 01001000b
.db 11110000b
About_Title:
.db " About ",0
By:
.db "By:",0
Name:
.db "Michael Cook",0
E_Mail:
.db "MBCook@MBCook.com",0
Web_Page:
.db "www.MBCook.com",0
Enter:
.db "Press Enter!",0
.end
end