Re: A86: untokenizing


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

Re: A86: untokenizing




_closeEditEqu will update imathptr2 and the size word in the program,
then calls _CLOSEPROG.  if you call _CLOSEPROG first, it will chop off
the end of the program.

_setupEditEqu also calls _EDITPROG, but i think it sets a flag and will
ignore the second call.

i've never managed to get _detok to work properly, but since closeeditequ
uses the editcursor as the end of the buffer, you might try calling
_bufToBtm before closing the buffer.

there's another call named _setEditDetok.  i don't know how it works, but
it might prove useful.

you shouldn't need to call these directly:

_EDITPROG - expand program
  input:
    ade -> start of program
    _PTEMP_END-_FREE_MEM = bytes to add
  output:
    bytes added at end of program
    _P_IMATHPTR1 = start of var (storage area :P)
    _P_IMATHPTR2 = original end of var (free space added here, update!!)
    _P_IMATHPTR3 = new end of var (byte after)
    _P_IMATHPTR4 = bytes after var (block moved size)
    all regs destroyed

_CLOSEPROG - collapse program
  input:
:    _P_IMATHPTR1 = ptr start of var storage area
    _P_IMATHPTR2 = original end of var (byte after end, update!!)
    _P_IMATHPTR3 = new end of var (byte after used)
    _P_IMATHPTR4 = bytes after var (block moved size)
  output:
    _P_IMATHPTR3+_P_IMATHPTR4 bytes
    moved to _P_IMATHPTR2
    all regs destroyed?

-josh

On Mon, 3 Jan 2000 22:48:33 EST Jeanne9005@aol.com writes:
>
>What does EDITPROG and CLOSEPROG do, other than the obvious, and what 
>are all of the parameters?
>
>Glen
>tutorial1.cjb.net
>
>In a message dated Mon, 3 Jan 2000  6:13:07 PM Eastern Standard Time, 
>ComAsYuAre@aol.com writes:
>
>> 
>> Ok I tried this to untokenize a basic program called AA just for 
>test 
>> purposes, and it doesn't seem to be working.  I've tried it without 
>the 
>> EDITPROG and CLOSEPROG calls, and that just seems to corrupt AA.  
>Any ideas?
>> 
>> .org _asm_exec_ram
>> 
>>     ld hl,name-1
>>     rst 20h
>>     rst 10h
>>     ret c
>>     call _setupEditequ
>>     call _EDITPROG
>>     call _detok
>>     call _CLOSEPROG
>>     jp _closeEditequ
>> 
>> name:
>>     .db 2,"AA"
>> 
>> 
>> ----
>> Jonah Cohen
>> 
>> http://linux.hypnotic.org/~jonah/ (down)
>
>
>

________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.