RE: A82: Blockbuster bug


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

RE: A82: Blockbuster bug




I also didn't scrutinize it for problems, but you can save more bytes if you
line up the text and just do D_ZM_STR or whatever rather than ld hl,blah so
you can save some bytage there.. like:

Title: .db "CoolEdit",0
       .db "by Ahmed E.",0

then I can do:
ld de,8*256+0
ld (CURSOR_X),de
ld hl,Title
ROM_CALL(D_ZM_STR)
ld de,16*256+0
ld (CURSOR_X),de
ROM_CALL(D_ZM_STR)

should save some space.. you can also make a lable "vputs" that does both ld
(CURSOR_X),de and ROM_CALL(D_ZM_STR).

Ahmed El-Helw <ahmed@ticalc.org>
Program Ideas, Upcoming Programs
the ticalc.org project - http://www.ticalc.org/
_____________________________
http://hail.icestorm.net/asm
ICQ : 3350394

> -----Original Message-----
> From: owner-assembly-82@lists.ticalc.org
> [mailto:owner-assembly-82@lists.ticalc.org]On Behalf Of Doug Torrance
> Sent: Sunday, November 01, 1998 3:51 PM
> To: assembly-82@lists.ticalc.org
> Subject: A82: Blockbuster bug
>
>
>
> Hi.  I wrote Blockbuster, originally for Ash, but it also worked fine
> under CrASH v1.1.  Recently, however, it has caused other games to crash
> when I use later versions of CrASH.  It always crashes ZTetris whenever
> I run Blockbuster first.  All I have to do is run the title screen of
> Blockbuster, too, I don't have to even play the game, and it crashes
> ZTetris immediately.  However, if I used the teacher key and saved a
> ZTetris game, it will run fine if I restore that game after running
> Blockbuster, and then crash when I exit.
>
> Interestingly, when I run Columns v3.0c (even just the title screen)
> between Blockbuster and ZTetris, nothing crashes, but since there's no
> source available, I can't find out why.
>
> Here's the source to the title screen of Blockbuster.  I can't figure
> out what it's doing wrong.  Perhaps someone more experienced can.
>
> Beginning:
> 	ROM_CALL(CLEARLCD)
> 	set 1,(IY+05)
> 	set 3,(IY+05)
> 	ld hl,0
> 	ld (CURSOR_X),hl
> 	ld hl,Title1
> 	ROM_CALL(D_ZM_STR)
> 	ld hl,Title2
> 	ROM_CALL(D_ZM_STR)
> 	ld hl,Title1
> 	ROM_CALL(D_ZM_STR)
> 	res 3,(IY+05)
> 	ld hl,$0800
> 	ld (CURSOR_X),hl
> 	ld hl,Manticore
> 	ROM_CALL(D_ZM_STR)
> 	ld hl,$0f00
> 	ld (CURSOR_X),hl
> 	ld hl,Author
> 	ROM_CALL(D_ZM_STR)
> 	ld hl,$1600
> 	ld (CURSOR_X),hl
> 	ld hl,Email
> 	ROM_CALL(D_ZM_STR)
> 	ld hl,$1d00
> 	ld (CURSOR_X),hl
> 	ld hl,HighScoreText
> 	ROM_CALL(D_ZM_STR)
> 	ld hl,(HighScore)
> 	call DM_HL_DECI
> 	ld b,0
>
> Menu:
> 	ld a,b
> 	cp 0
> 	jr z,StartIsHighlighted
> 	cp 1
> 	jr z,HelpIsHighlighted
>
> StartIsHighlighted:
> 	set 3,(IY+05)
> 	ld hl,$2a21
> 	ld (CURSOR_X),hl
> 	ld hl,Start
> 	ROM_CALL(D_ZM_STR)
> 	res 3,(IY+05)
> 	ld hl,$3223
> 	ld (CURSOR_X),hl
> 	ld hl,Help
> 	ROM_CALL(D_ZM_STR)
> 	jr Choose
>
> HelpIsHighlighted:
> 	res 3,(IY+05)
> 	ld hl,$2a21
> 	ld (CURSOR_X),hl
> 	ld hl,Start
> 	ROM_CALL(D_ZM_STR)
> 	set 3,(IY+05)
> 	ld hl,$3223
> 	ld (CURSOR_X),hl
> 	ld hl,Help
> 	ROM_CALL(D_ZM_STR)
>
> Choose:
> 	call GET_KEY
> 	cp $01
> 	jr z,DownOrUpKeyIsPressed
> 	cp $04
> 	jr z,DownOrUpKeyIsPressed
> 	cp $09
> 	jr z,EnterIsPressed
> 	cp $37
> 	ret z
> 	ld hl,(RANDSEED)
> 	inc hl
> 	ld (RANDSEED),hl
> 	jr Choose
>
> Thank you for your help!
>
> Doug Torrance
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>


References: