[A83] Re: Someone please help


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

[A83] Re: Someone please help




You didn't POP AF after pushing it!


>From: "Shane" <ti83asm2001@yahoo.com>
>Reply-To: assembly-83@lists.ticalc.org
>To: "assembly list" <assembly-83@lists.ticalc.org>
>Subject: [A83] Someone please help
>Date: Sun, 7 Oct 2001 11:12:05 -0400 (Eastern Daylight Time)
>MIME-Version: 1.0
>Received: from [195.67.128.9] by hotmail.com (3.2) with ESMTP id 
>MHotMailBD89BC2F006640042A1BC343800912300; Sun, 07 Oct 2001 08:14:00 -0700
>Received: from towerguard. (mx-1.sollentuna.net [195.67.128.9])by 
>mx-1.sollentuna.net (Postfix) with ESMTPid 796C718014; Sun,  7 Oct 2001 
>17:13:15 +0200 (CEST)
>Received: with LISTAR (v1.0.0; list assembly-83); Sun, 07 Oct 2001 17:13:15 
>+0200 (CEST)
>Received: from femail48.sdc1.sfba.home.com (femail48.sdc1.sfba.home.com 
>[24.254.60.42])by mx-1.sollentuna.net (Postfix) with ESMTP id 44F2A1800Bfor 
><assembly-83@lists.ticalc.org>; Sun,  7 Oct 2001 17:13:14 +0200 (CEST)
>Received: from up ([65.10.236.9]) by femail48.sdc1.sfba.home.com          
>(InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP          id 
><20011007151249.VLS18018.femail48.sdc1.sfba.home.com@up>          for 
><assembly-83@lists.ticalc.org>;          Sun, 7 Oct 2001 08:12:49 -0700
>From assembly-83-bounce@lists.ticalc.org Sun, 07 Oct 2001 08:15:52 -0700
>Delivered-To: lists.ticalc-assembly-83@mx-1.sollentuna.net
>Message-Id: <3BC070C5.000003.37205@up.vbch1.va.home.com>
>X-Mailer: IncrediMail 2001 (1500332)
>X-Priority: 3
>X-FID: FLAVOR00-NONE-0000-0000-000000000000
>X-listar-version: Listar v1.0.0
>Sender: assembly-83-bounce@lists.ticalc.org
>Errors-To: assembly-83-bounce@lists.ticalc.org
>X-original-sender: ti83asm2001@yahoo.com
>Precedence: bulk
>X-list: assembly-83
>
>
>Ok I have this problem of 'ret' not working correctly at the end of my
>program when it leaves the program it just gives me all these strange
>characters on the display and then when ever I goto lets say memory or the
>program menu and hit 2nd Quit it leaves the menu up and then just blinks a
>cursor in the corner so i have to take out the batteries or reset it for it
>to work, could someone please help, thanx,this is my quit comand:
>quit:
>res (write_on_graph),(iy+sgrflags)
>ei
>ret
>  the source for the whole program is below:
>nolist
>#include ion.inc
>_RunIndicOff =4570h
>#include keys.inc
>list
>#ifdef TI83P
>org progstart-2
>db $BB,$6D
>#else
>org progstart
>#endif
>ret
>jr nc,lblStart
>db "a",0
>lblstart:
>set (write_on_graph),(iy+sgrflags)
>bcall(_runindicoff) ; turn off run indicator
>bcall(_GrBufClr)
>ld a,00h ;reset xtest and ytest to zero
>ld (xtest),a
>ld a,00h
>ld (ytest),a
>ld a,03h
>ld (lives),a ;set lives to 3
>start:
>ld a,1 ;set level to one
>LvlSetup:
>bcall(_clrlcdfull) ;clear screen
>bcall(_GRBUFCPY) ;clear graphscreen
>ld b,a ;load level to b
>push af
>ld hl,5
>cp b
>jp z,lvla
>dec hl
>cp b
>jp z,lvlb
>dec hl
>cp b
>jp z,lvlc
>dec hl
>cp b
>jp z,lvld
>jp lvle
>lvla:
>(lots of drawing right here with (_iline) left it out because it is so huge
>it is calling on line down at the bottom)
>ld hl,1928h
>ld (pencol),hl
>ld hl,name
>bcall(_vputs)
>ld a,50h ;set initial x to 50h
>ld (xtest),a
>ld a,20h
>ld (ytest),a ;set initial y to 20h x,y=50,20
>ld a,01h
>ld (direction),a ;set initial direction to 1 which is up direction 1-up
>2-right 3-down 4-left
>jp txt
>lvlb:
>lvlc:
>lvld:
>lvle:
>txt:
>ld hl,3702h ;load position on screen x37 y2
>ld (pencol),hl
>ld hl,livestxt ;print "lives on screen"
>bcall(_vputs) ;put string on display
>bcall(_getkey) ;pause progarm until key entry
>jp move ;jump to move section
>getkey:
>halt
>halt
>halt
>halt
>halt
>ld a,(xtest)
>ld b,a
>ld a,(ytest)
>ld c,a
>ld a,(direction)
>ld e,a
>bcall(_getcsc)
>cp g_left
>jp z,left
>cp g_down
>jp z,down
>cp g_right
>jp z,right
>cp g_up
>jp z,up
>cp g_mode
>jp z,quit
>cp g_2nd
>jp z,pause
>dec e
>ld a,0
>cp e
>jp z,up
>dec e
>ld a,0
>cp e
>jp z,left
>dec e
>ld a,0
>cp e
>jp z,down
>jp right
>move: ;thanx Jimmy Pardey
>ld d,3 ; pixel test part
>ld a,(xtest)
>ld b,a
>ld a,(ytest)
>ld c,a
>bcall(_IPoint)
>jp nz,quit
>ld d,2 ;Pixel draw part
>ld a,(xtest)
>ld b,a
>ld a,(ytest)
>ld c,a
>ld a,b
>ld (xtest),a
>ld a,c
>ld (ytest),a
>bcall(_IPoint)
>jp getkey
>pause:
>bcall(_getcsc)
>ld a,0
>cp a
>jp z,pause
>jp move
>right:
>ld bc,(xtest)
>inc bc
>ld (xtest),bc
>ld hl,00000100b
>ld (direction),hl
>jp move
>down:
>ld bc,(ytest)
>dec bc
>ld (ytest),bc
>ld bc,00000011b
>ld (direction),bc
>jp move
>left:
>ld bc,(xtest)
>dec bc
>ld (xtest),bc
>ld bc,00000010b
>ld (direction),bc
>jp move
>up:
>ld bc,(ytest)
>inc bc
>ld (ytest),bc
>ld bc,00000001b
>ld (direction),bc
>jp move
>line:
>ld h,1
>bcall(_iline)
>quit:
>res (write_on_graph),(iy+sgrflags)
>ei
>ret
>xtest: .db 00h
>ytest: .db 00h
>direction: .db 00h
>lives: .db 00h
>name: .db "S.Z.",0
>livestxt: .db "LIVES: ",0
>end
>END
>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp