Re: A83: a question


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

Re: A83: a question




In a message dated 7/11/99 12:28:48 AM Central Daylight Time, 
bomber912@hotmail.com writes:

> Actually there is one more o in the _zerooop1 ....
>  anybody know why?  zero-o-op1 ?
>  but thank you very much....Jason_K
>  
>  it works fine now ...
>  
>  	push bc
>  	push bc
>  	ld hl,0257h
>  	ld (PENCOL),hl
>  	call _zerooop1
>  	ld a,b
>  	call _SETXXOP1
>  	ld a,1
>  	call _DISPOP1A
>  	pop bc
>  	ld hl,025Bh
>  	ld (PENCOL),hl
>  	call _zerooop1
>  	ld a,c
>  	call _SETXXOP1
>  	ld a,1
>  	call _DISPOP1A
>  	pop bc
>  
>  any optimisation ideas....
>  
>  thanks again
>  
>  homonerdicus

The extra 'o' in _zerooop1 is a little blunder on TI's part when they created 
the ti83asm.inc file, but it was corrected to _zeroop1 in squish.inc which I 
use more, except its rather huge and takes Tasm31 very long to read through, 
so I just put together my own include file to save compiling time because it 
contains only the romcalls I use most often...

And as for optimization, how about a little subroutine...? :)

; Input:  HL = Coordinates, A = Value you want to Display.

Display_A:
	ld (pencol), hl
	push bc
	push af
	call _zeroop1
	pop af
	call _setxxop1
	ld a, 1
	call _dispop1a
	pop bc
	ret

Load your coordinates like you have been doing, and call that subroutine for 
each time that you need it, so then you get...

	ld a, b
	ld hl,0257h
	call Display_A
	ld a, c
	ld hl,025Bh
	call Display_A
	etc.

There you go. Glad to be of help, cya... :)

Jason_K