samishal Posted December 15, 2011 Share Posted December 15, 2011 Hi there, I cant seem to get my program to display any text properly so was wondering if there was the source for a "hello world" program in assembly floating about which i could use. Also if you knwo any sites that have any tutorials on this, that would also be useful. Samishal Quote Link to comment Share on other sites More sharing options...
+RXB Posted December 16, 2011 Share Posted December 16, 2011 (edited) Well I have made tons of Video on how to do GPL and it is very similar. http://www.atariage....ment-resources/ This has all the Zip files links to the videos. I should add that the sequence of learning goes Basic, Extended Basic, GPL, Assembly or Forth or C. You also have Logo or Pascal that is like between XB and GPL so watch my videios on GPL and it should help. Edited December 16, 2011 by RXB Quote Link to comment Share on other sites More sharing options...
marc.hull Posted December 16, 2011 Share Posted December 16, 2011 (edited) Hi there, I cant seem to get my program to display any text properly so was wondering if there was the source for a "hello world" program in assembly floating about which i could use. Also if you knwo any sites that have any tutorials on this, that would also be useful. Samishal How about........ def start ref vmbw start li r0,40 li r1,hworld li r2,11 blwp @vmbw die limi 2 jmp die end start hworld text 'hello world' Edited December 16, 2011 by marc.hull Quote Link to comment Share on other sites More sharing options...
matthew180 Posted December 16, 2011 Share Posted December 16, 2011 Also if you know any sites that have any tutorials on this, that would also be useful. I would have to say this forum is very useful... Start here: http://www.atariage.com/forums/topic/162941-assembly-on-the-994a/ Here are two examples without dependencies: DEF MAIN VDPWD EQU >8C00 * VDP write data VDPWA EQU >8C02 * VDP set read/write address WS1 EQU >8300 * Workspace memory in fast RAM R0LB EQU WRKSP+1 * Register zero low byte address MSG1 TEXT 'HELLO WORLD' MSG1E EVEN MAIN LIMI 0 * Disable interrupts LWPI WRKSP * Load the workspace pointer to fast RAM * Clear the screen CLR R0 * Start at top left corner of the screen LI R1,>2000 * Write a space (>20 hex is 32 decimal) LI R2,768 * Number of bytes to write MOVB @R0LB,@VDPWA * Send low byte of VDP RAM write address ORI R0,>4000 * Set read/write bits 14 and 15 to write (01) MOVB R0,@VDPWA * Send high byte of VDP RAM write address CLS MOVB R1,@VDPWD * Write byte to VDP RAM DEC R2 * Byte counter JNE CLS * Check if done * Write the text message to the screen LI R0,395 * Screen location to display message LI R1,MSG1 * Memory location of source data LI R2,MSG1E-MSG1 * Length of data to write MOVB @R0LB,@VDPWA * Send low byte of VDP RAM write address ORI R0,>4000 * Set read/write bits 14 and 15 to write (01) MOVB R0,@VDPWA * Send high byte of VDP RAM write address DISP MOVB *R1+,@VDPWD * Write a byte of the message to the VDP DEC R2 * Byte counter JNE DISP * Check if done LIMI 2 * Enable interrupts INFLP JMP INFLP * Infinite loop END DEF MAIN * VDP Memory Map * VDPRD EQU >8800 * VDP read data VDPSTA EQU >8802 * VDP status VDPWD EQU >8C00 * VDP write data VDPWA EQU >8C02 * VDP set read/write address * Workspace WRKSP EQU >8300 * Workspace R0LB EQU WRKSP+1 * R0 low byte reqd for VDP routines * Data MSG1 TEXT 'HELLO WORLD' MSG1E EVEN * Program execution starts here MAIN LIMI 0 LWPI WRKSP * Clear the screen LI R0,>0000 * Start at upper left corner of the screen, assume name table is at >0000 LI R1,>2000 * Write >20 (32 decimal), remember the MSB is sent to the VDP LI R2,768 * 768 screen locations (32x24 tiles) BL @VSMW * Write the space 768 times * Write the text message to the screen LI R0,395 * Screen location to display message LI R1,MSG1 * Memory location of source data LI R2,MSG1E-MSG1 * Length of data to write BL @VMBW LIMI 2 LP9999 JMP LP9999 ********************************************************************* * * VDP Single Byte Multiple Write * * R0 Starting write address in VDP RAM * R1 MSB of R1 sent to VDP RAM * R2 Number of times to write the MSB byte of R1 to VDP RAM * * R0 is modified, but can be restored with: ANDI R0,>3FFF * VSMW MOVB @R0LB,@VDPWA * Send low byte of VDP RAM write address ORI R0,>4000 * Set read/write bits 14 and 15 to write (01) MOVB R0,@VDPWA * Send high byte of VDP RAM write address VSMWLP MOVB R1,@VDPWD * Write byte to VDP RAM DEC R2 * Byte counter JNE VSMWLP * Check if done B *R11 *// VSMW ********************************************************************* * * VDP Multiple Byte Write * * R0 Starting write address in VDP RAM * R1 Starting read address in CPU RAM * R2 Number of bytes to send to the VDP RAM * * R0 is modified, but can be restored with: ANDI R0,>3FFF * VMBW MOVB @R0LB,@VDPWA * Send low byte of VDP RAM write address ORI R0,>4000 * Set read/write bits 14 and 15 to write (01) MOVB R0,@VDPWA * Send high byte of VDP RAM write address VMBWLP MOVB *R1+,@VDPWD * Write byte to VDP RAM DEC R2 * Byte counter JNE VMBWLP * Check if done B *R11 *// VMBW END Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted December 16, 2011 Share Posted December 16, 2011 I cant seem to get my program to display any text properly so was wondering if there was the source for a "hello world" program in assembly floating about which i could use. I assume you know how to enter code, assemble and run then. Many ways lead to Rome, be it cross assembly, emulation or real iron. Also if you knwo any sites that have any tutorials on this, that would also be useful. I assume you have the Editor/Assembler manual. If not good, then at least reference for the instructions. Then there's many nice Assembly books available for download on the TI-99/4A Home Computer Book Archive. Quote Link to comment Share on other sites More sharing options...
samishal Posted December 19, 2011 Author Share Posted December 19, 2011 Hi guys, First of all, thanks for replying to my request so quickly, using the sources you gave me i have now fixed the problem Secondly I would like to apologise for the lateness of my thanks I have had some internet trouble. Samishal Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.