A83: Re: ram calls


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

A83: Re: ram calls




Woah, that's a pretty neat idea.  Not EXTREMELY useful, but pretty damn cool :)

What could you use it for though...what would have been cool is if there was a BASIC support routine to call something like
that.  But there isn't...:)

:ater,

James Matthews (matthews@tkb.att.ne.jp)

ICQ: 7413754
http://home.att.ne.jp/gold/tomcat21/index.html
http://library.advanced.org/18242/

----------
> From: Phelan Wolf <phelanwolf@hotmail.com>
> To: assembly-83@lists.ticalc.org
> Subject: A83: ram calls
> Date: Sunday, October 11, 1998 11:01 AM
> 


I tested my last theory, and it works.  I included two sample programs, 
ZRAMCALL.Z80, and ZCALLOFF.Z80.  You run ZRAMCALL to set up the calls, 
then you run ZCALLOFF to run it.  Unfortunatly you can't do call _off 
inside of the same program that sets it up.  I don't know why, but you 
just can't.  Also 1340bytes of routines can be stored there.

-Phelan 'Amen' Wolf

  MIND YOU:  DO NOT RUN ZCALLOFF WITHOUT RUNNING ZRAMCALL FIRST.  IT 
WILL CRASH YOUR CALC, I FOUND OUT THE HARD WAY. (i lost a basic program 
for chemistry, it was about 12K big, it took me forever to make.  as you 
might deduce i am incredibly angry.)

;PROGRAM:ZRAMCALL.Z80
;sets up ram call '_off'
.nolist
RAM_CALL = 8265h
_off     = RAM_CALL

.list
.org 9327h
 ld hl,off         ;load the off routine
 ld de,RAM_CALL    ;where to put it
 ld bc,6           ;it is 6 bytes long
 ldir              ;copy the data
 ld hl,RAM_CALL+7  ;load where to place some zeros
 xor a             ;clear a
 ld (hl),a         ;load the 00 at 8265h+06h
 ld hl,off2        ;load the second part
 ld de,RAM_CALL+8  ;where to put it
 ld bc,6           ;it is 6 bytes long
 ldir              ;copy the data
 ret

off:
 .db $f3,$3e,$01,$d3,$03,$3e,0
off2:
 .db $d3,$04,$08,$d9,$fb,$c9,0
 
end
.end

;PROGRAM:ZCALLOFF
;calls the ram call '_off'
.nolist
RAM_CALL = 8265h
_off     = RAM_CALL

.list
.org 9327h
 call _off

end
.end


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com