A83: Can you check this code:


[Prev][Next][Index][Thread]

A83: Can you check this code:




You really don't have to check this: it is a lot of code.  I would really
appreciate it if did, though.

The point of it is to display Master M and bounce it off the sides of the
screen.  All of the stuff at the begining is to make it A-Shel
compatible.  I managed to make it stable, the only problems are that the
words aren't in the right place and they don't move.

Also, I used register 'a'  a lot to make sure the instructions worked. 
I'm sure I didn't need it at least half of the time.

Thanks so much if you help.


.NOLIST
#define equ .equ
#define EQU .equ
#define end .end
#include "ti83asm.inc"
#include "tokens.inc"
.LIST

.org 9327h

    nop                     ;these 2 lines identify the program
    jr      prog_start      ;as AShell-compatable
    .dw     $0000         ;Version of table
    .dw     Description   ;Points to the program description
    .dw     Icon          ;Points to an 8x8 icon
    .dw     $0000         ;For future use ( *Libraries*? :)
prog_start:
Description:
 .db "Super Game 1.0 by Me",0
Icon:
 .db %10000010    ;this example icon is a box
 .db %01000100    ;icons are not displayed by AShell
 .db %01010100    ;but the next version of Aurora will support
 .db %00101000    ;this format for icons
 .db %00010100
 .db %00101010
 .db %00100010
 .db %01000001

Start:
	call	_clrlcdfull
	ld	hl,0000h
	ld	(CURROW),hl
	ld	hl,Title
	call	_puts
	ld	hl,0001h
	ld	(CURROW),hl
	ld	hl,Author
	call	_puts
GetKey1:
	call	_getkey
	cp	05h
	jp	z,Init
	jp	nz,GetKey1
Init:
	ld	a,29
	ld	b,a
	ld	a,29
	ld	c,a
	ld	a,1
	ld	d,a
Display:
	call	_clrlcdfull
	ld	a,c
	ld	(PENCOL),a
	ld	a,b
	ld	(PENROW),a
	ld	hl,Message
	call	_vputs
Check1:
	ld	a,l
	cp	d
	jp	z,D1
	ld	a,2
	cp	d
	jp	z,D2
	ld	a,3
	cp	d
	jp	z,D3
	ld	a,4
	cp	d
	jp	z,D4
D1:
	ld	a,b
	inc	a
	ld	b,a
	ld	a,c
	inc	a
	ld	c,a
	cp	a
	jp	z,DCC1
D2:
	ld	a,b
	dec	a
	ld	b,a
	ld	a,c
	inc	a
	ld	c,a
	cp	a
	jp	z,DCC1
D3:
	ld	a,b
	dec	a
	ld	b,a
	ld	a,c
	dec	a
	ld	c,a
	cp	a
	jp	z,DCC1
D4:
	ld	a,b
	inc	a
	ld	b,a
	ld	a,c
	dec	a
	ld	c,a
	cp	a
	jp	z,DCC1
DCC1:
	ld	a,55
	cp	c
	jp	z,DC1
	jp	nz,DCC2
DC1:
	ld	d,2
DCC2:
	ld	a,58
	cp	b
	jp	z,DC2
	jp	nz,DCC3
DC2:
	ld	d,3
DCC3:
	ld	a,0
	cp	c
	jp	z,DC3
	jp	nz,DCC4
DC3:
	ld	d,4
DCC4:
	ld	a,0
	cp	b
	jp	z,DC4
	jp	nz,GetKey2
DC4:
	ld	d,1
Getkey2:
	call	_getkey
	cp	05h
	jp	z,Exit
	jp	nz,Display
Exit:
	call	_clrlcdfull
	ld	hl,0000h
	ld	(CURROW),hl
	ret
Title:
 .db "Word Mover Plus",0
Author:
 .db "By Mastermind",0
Message:
 .db "Master M",0	;Feel free to change this

.end
END

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]


Follow-Ups: References: