Re: A86: RAM paging
[Prev][Next][Index][Thread]
Re: A86: RAM paging
At 06:23 AM 9/29/98 -0700, you wrote:
>
>How do I access stuff on different RAM pages?
You use Ports 5 and 6
>Do I have to change to that page, or can I call a three byte address?
You can do some things with absolute addressing, but its a bit of a pain,
so i generally just use the ports.
>HOW do you change the RAM page?
You want RAM page 3 set?
Some_Code:
ld a,$03 ;the page
add a,$40 ;i dont remember why you have to add 40
out (6),a ;the actuall switch
ret
If you have an absolute address in ahl, you can do a rom call:
call _load_ram_ahl
or just to convert the address to asic:
call _conv_ahl
Both of these calls can be found in ti86un.inc on Dux's site.
>And what tokens mean a program is written in BASIC?
If you know the name of a program, do this:
The_code:
ld hl,ProgName-1 ;where ProgName it the name of the prog
rst 20h ;name to op1
rst 10h ;find address
ld a,b ;move it to ahl form bde
ex de,hl
call _load_ram_ahl ;rom call to set page and point hl to
inc hl ;3 bytes past the size
inc hl
inc hl
ld a,(hl) ;load the identifier into a
cp $28 ;is it Regular ASM?
jr z,AsmProgram ;if so, jump here
cp $27 ;is it a hex program
jr z,HexProgram ;jump here
cp $29 ;protected basic?
jr z,ProtBasic
jr BasicProg ;if it isnt any of these, goto basicprog
I dont know what the token is for basic. All i know is that a program is
basic if its not any of the other types.
Hope this helps.
CHICANE
ICQ: #14727618
chicane on EFNET #ti
Homepage: Under Construction.
References: