Jump to content
IGNORED

Programming in GPL Assembler on TI99/4a


JonnyBritish

Recommended Posts

Interesting to read about GPL assemblers on tis forum. I was under the impression you needed a ti 990 minicomputer to do this? What if any would be the advantage of coding in GPL?

 

Mostly in GPL I can do about 3 times as much in the same amount of space of memory as Assembly. because GPL is extreamely compact and the TI OS is designed around it.

An example is AMS support built into RXB. The entire amount of GROM memory is only 700 bytes and allows commands AMSON, AMSOFF, AMSPASS, AMSMAP and AMSBANK.

Also including ISR (Interupt Service Routine) Hooks to be controlled. This would be a very expensive amount on memory to use in Assembly.

GPL allows full control of the AMS including using a GPL command MOVE that is only 7 bytes and moves any kind of memory to any kind of memory of any size.

 

With Classic99 when you put the TI99/4A with System Throttling to System Maximum it can really go to town. Besides 90% of all the cartridges are GPL and only after people figured out how to make GPL simulators did they start making ROM Cartridges.

 

Typically a 6K GROM programs would take up 18K in Assembly as you also need the support routines loaded which is also 1K mimimum. GPL is best for control and set up of the machine, Assembly is best at use after a GPL set up.

 

***********************************************************

VEIW40 DATA EADSR * Viewer 40 Column

DATA MV40

STRI 'V40'

*******************************

MV40 DST @>8356,@>8358 * Get the PAB file line length

DSUB @>8354,@>8358 * Subtract the PAB offset

MOVE 10,V@-10(@>8358),@FAC * Get the address of the line loaded by DSR

AND >1F,V@-9(@>8358) * Set for error check

CH >04,@FAC * Opcode higher then Read?

BS DSREXT * Yes

CASE @FAC * Like the XB ON x GOTO

BR VOPEN * OPEN

BR VCLOSE * CLOSE

BR DSREXT * READ

MOVE 880,V@80,V@0 * WRITE to screen

MOVE 80,V*FAC2,V@880 * Save the Data Buffer address string

SCAN * Get a key

BR DSREXT * No key

FREEZE SCAN * Check for a key again

BR FREEZE * Yes, so just loop in FREEZE

BS DSREXT * Keep loading lines to screen

VOPEN MOVE 128,V@>0380,V@-128(@>8370) * Show the file opened

ST >F0,@FAC * VDP Register 1 value for video mode

MOVE 1,@FAC,#1 * Set to TEXT MODE

ST >F0,@>83D4 * Put a copy here for OS updates

ST >20,V@0 * Space at screen here

MOVE 959,V@0,V@1 * Ripple it on entire screen

DSREXT CALL RETURN * Exit back to DSR

VCLOSE SCAN * Wait for user to exit last line on screen

BR VCLOSE * Close DSR

MOVE 128,V@-128(@>8370),V@>0380 * Show the closed file

ST >E0,@>8300 * VDP Register 1 value for video mode

MOVE 1,@>8300,#1 * Set to GRAPHICs MODE

ST >E0,@>83D4 * Put a copy here for OS updates

BR DSREXT * Exit this routine

************************************

 

This is a fake DSR and Device in GPL that reads a file and puts it on screen one line at a time with a key scan to keep on showing each line. It even switches the TI from Graphics mode to Text mode and back when done.

Can you imagine the size of a Assembly program to do this?

By the way in GPL a DSR can call a DSR that can call a DSR and it will work it's way back to the original in GPL. No one uses a Assembly DSR that can do this as you need GPLLNK DSR to keep track.

Edited by RXB
Link to comment
Share on other sites

  • 6 years later...

Was there ever a native GPL dev environment for the TI99/4A either cart or disk based?

Most of the TI99/4A carts are GPL GROM carts.

 

 

Yea Ryte Data GPL Assembler (what I use) and like 6 others made.

Swedish GPL Assembler

Weiand GPL Assembler

RAG GPL Assember (RAG GPL Linker)

 

Some of the ones I have messed with but keep going back to the Ryte Data GPL Assembler as my favored one.

Link to comment
Share on other sites

Most of the TI99/4A carts are GPL GROM carts.

 

 

Yea Ryte Data GPL Assembler (what I use) and like 6 others made.

Swedish GPL Assembler

Weiand GPL Assembler

RAG GPL Assember (RAG GPL Linker)

 

Some of the ones I have messed with but keep going back to the Ryte Data GPL Assembler as my favored one.

Thanks, I'll do some reading on GPL.

Link to comment
Share on other sites

Thanks, I'll do some reading on GPL.

GPL HOW 2 Series video

A complete series on how to program GPL (Graphics Progroamming Language) on the TI-99/4A.

Each tutorial has its own support package with example code, GPL assembler, etc.

Video tutorials done by Rich, the programmer of Rich Extended Basic.

(Author: RXB)

 

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip
  • Like 3
Link to comment
Share on other sites

GPL HOW 2 Series video

A complete series on how to program GPL (Graphics Progroamming Language) on the TI-99/4A.

Each tutorial has its own support package with example code, GPL assembler, etc.

Video tutorials done by Rich, the programmer of Rich Extended Basic.

(Author: RXB)

 

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

video / zip

 

Wow, Thanks!

  • Like 2
Link to comment
Share on other sites

Is there a debugger for GPL that lets you see what is happening when the program misbehaves? Something like the debuger in Classic99, but which provides disassembled GPL code and that lets you single step through a GPL program and set breakpoints, etc. I can see something like that being very useful.

 

Ah, the youngare so lazy these days... :grin:

 

You just have to learn all the hex representation of the token in ram that you write down on a paper pad with a blunt #2 pencil :grin:

Edited by AMenard
Link to comment
Share on other sites

...that lets you single step through a GPL program and set breakpoints, etc.

You can do that with the Classic99 debugger: http://atariage.com/forums/topic/207330-classic99-cpu-bug/?view=findpost&p=3134616

 

It does not disassemble the instruction, but if you have a GPL listing with the addresses of each instruction, thats no problem.

Link to comment
Share on other sites

@Gazoo worked that way in his head. Wish he were still with us, :sad:

 

...lee

I recently downloaded a couple of 6502 assembler books from Archive.org

Most of the give the corresponding numerical value for each instruction. One of them, the one I got that is more Apple II oriented recommend to learn those value as to make the use of the built in monitor more efficient.

 

Of course, compared to modern CPU, the 6502 assembler has less instructions/values to remember.

 

The last assembler I used was for the 68000 when I was working on my Bsc at the university. But that's a good thing since it feels like I'm learning it for the first time :-)

Link to comment
Share on other sites

  • 3 weeks later...

Dear RXB,

 

Thank you for your explanations on GPL.

 

Mostly in GPL I can do about 3 times as much in the same amount of space of memory as Assembly. because GPL is extreamely compact and the TI OS is designed around it.

At this point I have a question: Of course Assembly Language programs written for EA run faster than GPL programs, or?

 

 

Regards

Edited by MueThor
  • Like 1
Link to comment
Share on other sites

Actually, I believe the GPL interpreter in the console ROM is actually pretty fast, considering that the console ROM is running on the 16-bit bus with no wait states and that the interpreter is working with single-byte tokens. The problem, I think, is that GROM access is interminably slow.

 

...lee

  • Like 1
Link to comment
Share on other sites

Actually, I believe the GPL interpreter in the console ROM is actually pretty fast, considering that the console ROM is running on the 16-bit bus with no wait states and that the interpreter is working with single-byte tokens. The problem, I think, is that GROM access is interminably slow.

 

...lee

 

Hmmm... makes me wonder if I should make a GPL Cross-compiler that uses Forth source code.

It already uses a parameter stack and return stack.

 

So much code, so little time.

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...