[A83] Re: Ambivalent Ion programs [83/83+] ADDED in P.P.S., Ambivalent M


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

[A83] Re: Ambivalent Ion programs [83/83+] ADDED in P.P.S., Ambivalent Miragos Programs




> when you start from TIOS (83+)/ZASMLOAD(83) it executes the xor a,
> which zeroes register a and sets the zero flag. when you start from ion,
> this part is skipped, so the a register has some value. subsequently,
> register a will be zero when you run it from TIOS/ZASMLOAD, so
> you can check for that to see if it is executed from ion or not.

Do we realy know if Ion doesn't "cheat"? (If it zeros the flag too?)
I haven't had time to check that this weekend.

>I'll put it in a file, and post it to TICalc someday
Do that... only if it works, of coarse...

>Henk, could you convert it into a Z80ASM version?
Here it is...

I don't know what happens if you use INVOKE(blah) in an assembly-file but
you don't feed z80asm with the -plus option...
I hope it just sees it as a normal call...

As you'll see, bcall() is changed into INVOKE(). You'll need to asemble it
with the -plus option to make z80asm understand this. You'll also need the
newest (patched) version of z80asm. You can it at z88dk.sourceforge.net (I
hope).

You need to find some good include file I know there IS one (the person who
make the patch for INVOKE() also made the include-file), but WHERE? I'll
look around... It's (very) possible that the maker of the include file is
also "listening" to the is list, so he will notice us.
If I'm not mistaken then it was Solignac Julien from xcalc.org...

MODULE IonHeader
; You can remove this line if you don't want to use the linker.
; But if you do, then you only need to make programs with:
;
; INCLUDE xxxx 
; XREF IonHeader
; .__ION__
; ...Bunch of code...
;
; And link that with the object-file you created from this file...

INCLUDE xxxx   ; Find-The-Includefile(TM)

IF TI83P
       ORG progstart-2
       DEFB $BB,$6D
ELSE
       ORG progstart
ENDIF
       xor a
       jr nc,start
       DEFB "name",0
.start:
        or      a
        jr      nz,__ION__
; JR doesn't go that far...
; So I changed the order.
.__TIOS__:
       INVOKE(_clrlcdf)
       INVOKE(_homeup)
       ld hl,__TIOS_Text1__
       INVOKE(_puts)
       INVOKE(_newline)
       ld hl,__TIOS_Text2__
       INVOKE(_puts)
       INVOKE(_newline)
       ld hl,__TIOS_Text3__
       INVOKE(_puts)
       INVOKE(_newline)
       ret

.__ION__:
;... Place your ion-program here...
;... Or remove this entier section if you use the linker ...
       ret

.__TIOS_Text1__:
       DEFB "Please run this",0
.__TIOS_Text2__:
       DEFB "program through,0
.__TIOS_Text1__:
       DEFB "the ION-Shell!",0

You could use TENTER (or something, puts an enter to the screen) to shorten
the code and use less labels. Writing the message at the bottom of the
screen in small font is also very beautyfull (take a look at Zes, when it
installs), but then you can't use the TENTER trick...


> P.S. Is it an idea to "implement" this into the C-Compiler?
I'll see... But I don't think we'll use it, why would you need that? Most
people don't "hack around" with ZASMLOAD, they normaly don't use it. Only
sometimes when a BASIC program does the job for them (written by somebody
else, aka the programmer of the game).

	Henk Poley