A86: Re: Mem and _createreal


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

A86: Re: Mem and _createreal




See inside.

----- Original Message -----
From: Bryan Kam <bryan_kam@usa.net>
To: <assembly-86@lists.ticalc.org>
Sent: Saturday, December 25, 1999 11:44 PM
Subject: A86: Mem and _createreal


> I'm trying to make a real called mem and store the free ram in it, but I'm
> having trouble with _createreal.  I know I have to load the name of the
real
> into OP1 in variable name format, but it isn't working.  Here's the code
> I've tried:
>
> .org _asm_exec_ram
>
> ld hl,NM
> call _mov10toop1
> call _createreal ;Hopefully will make "mem"
>
> ;I suspect I'm doing something seriously wrong . . . I don't really know
if
> I should be using .db or what
>
> call _memchk ;Puts free ram in ahl
>
> ret
>

; Replace below code with following
; This is a very common mistake, you used the character '3' not the number 3
NM = $ - 1
.db 3,"MEM"

> NM:
> .db "A3MEM" ;In asm studio it says the first byte doesn't matter when
> creating but the second is the length of the name
>
> .end
>
> Also, once I have made the variable, how can I move the memory into it?

I thought there was a function in rom86.inc that stores a number to a real,
but if not, you can always rely on _mm_ldir, plenty of samples of that in
the source section on ticalc...

> Thanks,
>
> Bryan




References: