[A86] Re: Hey All, Some beginner Question :)
[Prev][Next][Index][Thread]
[A86] Re: Hey All, Some beginner Question :)
Ah, yes Asm Studio is better at that, but oh well.
You have to manually fix any absolute addresses in the relocated part of
the program.
Here's a [sqrt]Form prog that should work with TASM:
(note how "call show" becomes "call show-myform+_asm_exec_ram")
#include "asm86.h"
#include "ti86asm.inc"
#include "ti86abs.inc"
#include "ti86ops.inc"
_formreal equ $5191
_pop_fp equ $479f
_ABS_MOVE equ $524d
.org _asm_exec_ram
ld hl,name-1
rst $20
rst $10
jr c,install
jp _delvar ;os will reset the flag for us
install:
ld hl,myformend-myform+2
call _CREATEPROG
xor a
ld hl,2
add hl,de
adc a,b
call _SET_ABS_DEST_ADDR
xor a
ld hl,here
call _SET_ABS_SRC_ADDR
ld hl,myformend-myform+2
call _ABS_MOVE
set 1,(iy+$24)
ret
name: .db $05,$10,"FORM"
here:
.db $8e,$28
myform: call _pop_fp
ld a,(_OP1)
and $1f
cp $01 ;ignore not simple complex #
jr z,mf0
cp a ;set zf
ret
mf0: ld (_curCol),a ;start in col 1
call show-myform+_asm_exec_ram
ld a,'+'
call _putc
call _OP2TOOP1
call show-myform+_asm_exec_ram
ld a,'i'
call _putc
call _newline
or a ;clear zf
ret
show: ld a,18
call _formreal
ld hl,_OP3
jp _puts
myformend:
.end
-josh
On Sat, 1 Jun 2002 17:22:14 -0400 Xavier LaRue <paxl@videotron.ca>
writes:
>
> Ok, I know that is not a beginner question but this is an
> interesting question,
> So .. I need to use the home screen hook so this will be
> [sqrt]Home..
> It is called when the input buffer is modified(If it work like in
> the 83+ .. this will be simple to port my rpn parser ) ... But I
> can't make it work because TASM dos'nt like 2 .org in one file.. can
> somone help me with that detail, I can't make homestck( an prog that
> use home screen hook ) compile right.. I don't use asm studio
> because I'm in linux.. So How to compile a prog with 2 .org to make
> it work Correctly .. ??
>
> Thx all
> Xavier LaRue
>
>
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/web/.
Follow-Ups: