Updated GFA-BASIC Library released

Re: Updated GFA-BASIC Library released

Messagede lp060 » Mer 24 Nov 2010 18:55

Still its interesting. To close to work time here, I'll try post that updated listing after work or tomorrow.

One thing I'm not sure about is the use of variables inside the interrupt. Really the interrupt routine is not running in the context of GFA. Access to GFA variables requires a5 remain unchanged. Perhaps it would just explode if a5 is changed? I'm not sure, maybe I worry about nothing. :)
Avatar de l’utilisateur
lp060
 
Messages: 144
Inscription: Dim 14 Déc 2008 23:12
Localisation: My desk

Re: Updated GFA-BASIC Library released

Messagede tomchi » Mer 24 Nov 2010 21:22

Hehe , you're right lonny.
I remember, before i asked you if compiler could make life easier, having some troubles to make it work.
I started trying to save/restore all registers and indeed it crashed.
Can we say GfA variables are a5 relative ? :P
Anyway, one can't compute many many things in the interrupt procedure
Even, using BMOVE isn't allowed whilst the interrupt is on or at least disturbs process.
Avatar de l’utilisateur
tomchi
Administrateur du site
 
Messages: 342
Inscription: Mer 15 Oct 2008 20:51

Re: Updated GFA-BASIC Library released

Messagede lp060 » Jeu 25 Nov 2010 22:32

Here's is the updated listing using a local variable:

Code: Tout sélectionner
$M65536 !only use this amount of ram (remove or change as needed)
$F<     !do not check for missing returns in functions (required)
'
' If you need the addresses of several routines, just copy function get_int_adr
' put it above the routine you want the address of, and rename it to something else.
' Then call it.  Its that easy and no searching. Do not change the contents of the
' function or it will fail.
'
addr%=@get_int_adr
PRINT "$";HEX$(WORD{addr%},4) !dump the first word of the interrupt as a test
' if you see $48E7, it worked!
EDIT
'
FUNCTION get_int_adr !this routine must be right above the one you want the address of
  $F%         !return an integer and not a float (required)
  LOCAL a%    !we need a temporary location to save the address
  ~V:a%       !address of a% -> a0
  $w 43FA000E !lea    ref(pc),a1 ;this fetches the address of the routine below
  $w 2089     !move.l a1,(a0)    ;stuff the address into our temporary var
  RETURN a%   !return the address from our temporary var
ENDFUNC       !this line does not generate code
' ref:        !this is the reference point
PROCEDURE interrupt !this line does not generate code
  $w 48E78080       !movem.l d0/a0,-(a7)
  '                  interrupt code here
  $w 4CDF0101       !movem.l (a7)+,d0/a0
  $w 4E73           !rte
RETURN              !this rts is never reached (becomes dead code)
Avatar de l’utilisateur
lp060
 
Messages: 144
Inscription: Dim 14 Déc 2008 23:12
Localisation: My desk

Re: Updated GFA-BASIC Library released

Messagede tomchi » Lun 29 Nov 2010 23:48

Ok, so everything seems to be in place to make efficient use of that compiler update.

I posted some kind of tutorial today on how to code an interrupt with GfA basic, without using your compiler.

May I post another "tut" using the new compiler commands now or is it better you officially release the update ?
Avatar de l’utilisateur
tomchi
Administrateur du site
 
Messages: 342
Inscription: Mer 15 Oct 2008 20:51

Re: Updated GFA-BASIC Library released

Messagede lp060 » Mar 30 Nov 2010 18:07

All of my tests seem to work quite well to. You can post that if you like. I have updated the docs and will see about getting it released this coming weekend. ;)
Avatar de l’utilisateur
lp060
 
Messages: 144
Inscription: Dim 14 Déc 2008 23:12
Localisation: My desk

Re: Updated GFA-BASIC Library released

Messagede lp060 » Lun 6 Déc 2010 08:05

Ok, revision 18 of the compiler is now up at my site. I have also added the original editor to my download section for users who wish to code in SingleTOS, but wish to use the new compiler and library.
Avatar de l’utilisateur
lp060
 
Messages: 144
Inscription: Dim 14 Déc 2008 23:12
Localisation: My desk

Re: Updated GFA-BASIC Library released

Messagede Strider » Mer 20 Juil 2011 23:16

Tomchi told me about this special revision of the compiler during a coding party some months ago, I'm going to test and explore all this stuff.
Thanks lp060 for your work!
Strider
 
Messages: 25
Inscription: Sam 18 Oct 2008 16:22

Re: Updated GFA-BASIC Library released

Messagede lp060 » Jeu 21 Juil 2011 05:15

If you have any problems with the library or any questions at all, just ask. Always glad to help.

For those that don't know my Hades died where I do all the GFA work. :cry: I made a backup the moment the machine started acting up, then I done some work on the machine, it seemed better then got worse, then finally gone. The machine seemed ok for about 2 months so I went back to work on things, then poof. I have finally recused this work, and after a few months of not having any working Atari setup I am back. Rough couple of months.

There might be a revision 19 eventually, when the Hades went down I was working on speeding up the TEXT command as its not implemented in an efficient way. I started on a syntax highlighting engine too. Probably trash that and start over in assembler. It works, but its to slow. ;)
Avatar de l’utilisateur
lp060
 
Messages: 144
Inscription: Dim 14 Déc 2008 23:12
Localisation: My desk

Re: Updated GFA-BASIC Library released

Messagede lp060 » Dim 15 Jan 2012 23:51

BSAVE in the runonly has some bug. It writes truncated files. Its ok compiled though. I have found the problem. Same problem with DIR TO a file. Update coming eventually. Sorry if this caused anyone some headaches. Certainly caused me some as it took a few months to find it. :oops:
Avatar de l’utilisateur
lp060
 
Messages: 144
Inscription: Dim 14 Déc 2008 23:12
Localisation: My desk

Re: Updated GFA-BASIC Library released

Messagede lafleche » Mar 17 Jan 2012 10:49

I will probably use the "DIR TO" keyword in the next coming weeks , so thank you !
Avatar de l’utilisateur
lafleche
 
Messages: 136
Inscription: Lun 25 Jan 2010 14:41
Localisation: Lille

PrécédentSuivante

Retourner vers English section

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité

cron