A86: TI-86 ASM HELP! (reply to the original question)


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

A86: TI-86 ASM HELP! (reply to the original question)



>I think this is how to do it, but I haven't tested it yet (I didn't 
know 
>my senior year would be so busy!)...
>
>46EBh -- create REAL var OP1
>store length of var name (1) to (OP1+1)
>store name of var to (OP1+2), up to 8 characters [(op1+2) to (op1+9)]
>
>B is the page, DE is where the data is -- I guess you need to convert 
>this to AHL (b->a, d->h, e->l) so that you can use 462Fh to change AHL 
>(24-bit address) to a 16-bit address put in HL and sets the ram page A
>or 4633h to change AHL to HL and put the RAM page number into A.
>
>
>Hope this helps,
>Muhammed


The stuff I sent before (above) might be a bit confusing, so I decided 
to rewrite it... I also tested it out last night, but it only creates a 
var... I can't write anything to it. Maybe I'm doing something wrong? 
I'm really new to ASM so I can only debug so much...


-------------

#include "asm86.h"
#include "ti86asm.inc"

.org _asm_exec_ram

	call _clrLCD
;
	ld hl,file1		; point hl to file1, which contains 				; description of 
type
	rst 20h			; stores stuff at hl to OP1
	call _CREATEREAL	; create a REAL variable, based on 				; info in OP1
	ld a,b			;
	ld h,d			; copy BDE to AHL
	ld l,e			;
	call 462Fh		; set RAM page to A, put 16 bit 				; address in HL
	ld a,3			; put something into (de) addr of var
	ld (de),a		;  - this doesn't seem to work though
	ret

file1:
	.db 00h,1,"Z"		; filetype 00 = real, name length = 1, 				; name = "Z"

.end

-------------

As I said above, the prog creates a variable, but after that I'm not 
sure what it does anymore...

maybe u can find what's with it?

Mj

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