LZ: RE: lot's of stuff


[Prev][Index][Thread]

LZ: RE: lot's of stuff



On Saturday, June 28, 1997 10:45 PM, Buddy Smith[SMTP:ti85calc@bellsouth.net] wrote:
> Math Question:
> I posted the original message bout a week ago.  All of those multiply
> routines are great, but I only need to multiply 8 bit numbers.  Wouldn't it
> be faster for me to use an 8 bit routine?  
> 

Here's the 8x8 multiplication routine from Programming the Z80, by Rodney Zaks... it's *very* fast, very elegant, and very small (6 instructions!!), quite possibly the fastest possible 8x8 multiplier (unless you unroll the loop).

;HL = L * E
	ld	B, 8
MultLoop:
	add	HL, HL
	jr	nc, NoAdd
	add	HL, DE
NoAdd:
	djnz	MultLoop
	ret

> One more thing...
> Where exactly does USGARD relocate a prog, and can someone explain HOW it
> does it? (I know why, but want to know how...)
> 

It doesn't actually move the program, it changes all the addresses within the program (that are marked with an R_), so they point to the actual place within the program.  It's much faster than adding PROGRAM_ADDR all the time, or using CALL_s, and JUMP_s.


> One more thing...
> Did anyone ever determine how the screen is done on the TI-86?

I haven't heard anything, but I'd bet that they left it (otherwise they'd have to rewrite all their code).  But I could be wrong...

	Sam
-- 
Sam Davies <sdavies@mail.trilogy.net>