Jump to content
IGNORED

Assembly code samples


GDMike

Recommended Posts

I couldn't find any assembler code that pulls the date/clock from the TIpi.

I threw everything I could into this code and I don't know what everything is, but I got my results. Feel free to chime in with a better way to pull the date and clock seperately.

Lol, I'm just thrilled to get this far in my own, so plz don't laugh...hey, you there! I heard something!!

 

 

IMG_20200810_082548965_TOP.jpg

IMG_20200810_082554146_TOP.jpg

IMG_20200810_082600359.jpg

IMG_20200810_082626117_HDR.jpg

IMG_20200810_082633375.jpg

Edited by GDMike
Spell chk
  • Like 1
Link to comment
Share on other sites

18 minutes ago, GDMike said:

I couldn't find any assembler code that pulls the date/clock from the TIpi.

I threw everything I could into this code and I don't know what everything is, but I got my results. Feel free to chime in with a better way to pull the date and clock seperately.

Lol, I'm just thrilled to get this far in my own, so plz don't laugh...hey, you there! I heard something!!

 

 

 

IMG_20200810_082548965_TOP.jpg

IMG_20200810_082554146_TOP.jpg

IMG_20200810_082600359.jpg

IMG_20200810_082626117_HDR.jpg

If you look in the AfterHours BBS topic area, and then download one of the zip files, I have assembly source code for pulling the time/date from the TIPI.  Basically, you need to setup up PAB, open it, read it, and then close it.

 

The calling routine is found in BBSSETUP in the source directory, and I think BBSCLOCK has the code where it does the actual opening, reading, and closing.

 

You should be able to pull up the earliest source files so you do not need the huge zip files that also include the download library.

 

After you get the time, you will want to periodically update the time if you choose to display the time.  The source also has in the BBSCLOCK routine the code for the interrupt driven timer.  It too is called up from BBSSETUP.

 

Beery

  • Like 2
Link to comment
Share on other sites

50 minutes ago, GDMike said:

I couldn't find any assembler code that pulls the date/clock from the TIpi.

I threw everything I could into this code and I don't know what everything is, but I got my results. Feel free to chime in with a better way to pull the date and clock seperately.

Lol, I'm just thrilled to get this far in my own, so plz don't laugh...hey, you there! I heard something!!

 

IMG_20200810_082548965_TOP.jpg

 

  ■  ■  ■

 

Perhaps I am being a bit harsh here, but it is very frustrating to try to help you with your code when you post it this way. Normal text posts are so much more useful and easier to read if someone wishes to assist you. Cutting and pasting code is considerably faster and safer than error-prone re-typing of code. I thoroughly enjoy troubleshooting your code with you, but not with these code screen graphics.

 

...lee

  • Like 1
Link to comment
Share on other sites

7 hours ago, GDMike said:

But I'm on real hw.

Sorry for the inconvenience.

But I do have a phone. Lol

But the photos are in order.

This was just informational anyway, since I already got the code working.

 

I am wondering if you have an RS232 card in your TI-99 GDMike?

Then you can get a shareware/freeware terminal program for your PC and "print" your source code to the PC with the printer device as: "RS232.BA=9600".

Then post that file here on Atariage.

Would that work for you?

 

  • Like 2
Link to comment
Share on other sites

No printer, Except my cannon wifi.

But I could pull my source IF needed over on the TIpi side and load it up with classic99. 

it'sa hassle for something quick and dirty though since I get Atariage thru my password remembered phone, not using my laptop for anything related to internet anymore, I use my phone for everything.

But, like I said, if needed I could tap into my file manager on my phone and pull a source file from my samba share on the raspberry pi and upload that to Atariage also.

But.... pictures work for eyeballing code.

But if the intention is to use it as paste code, naaa.. photos really sucks at that.

I'm actually writing to you while watering my yard. Lol, meaning, I don't use a PC or laptop if I can help it. BUT I do use classic for compiling, again grabbing a shared file on the pi folder and running at max operation for compiling. ?

 

 

Edited by GDMike
Typos stupid spell check
Link to comment
Share on other sites

Another simple way to paste code, etc.

 

If the source code is on the TIPI already, use TIDIR on your PC  to open up the source code file and do a copy/paste to Atariage of the segment in question.

 

The nice thing about pasting code, versus photos, is that others can paste the segments into either their code or test your code out trying to help you through an issue.

 

Beery

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

I saw this on SNP comments..

DATA operands are words (2 bytes), so you need to double the selection number to get the proper index into the table. Also, your BL will try to execute that word. You need to load that word into a register:

SUBTAB DATA SUB0,SUB1,SUB2,SUB3,SUB4,SUB5,SUB6
       LI   R1,3             * select sub-routine 3
       SLA  R1,1             * double R1 to get proper index
       MOV  SUBTAB@(R1),R1   * load the sub-routine address
       BL   *R1              * branch to it

 

...lee

Link to comment
Share on other sites

I saw this on supernotes comments..

DATA operands are words (2 bytes), so you need to double the selection number to get the proper index into the table. Also, your BL will try to execute that word. You need to load that word into a register:

SUBTAB DATA SUB0,SUB1,SUB2,SUB3,SUB4,SUB5,SUB6
       LI   R1,3             * select sub-routine 3
       SLA  R1,1             * double R1 to get proper index
       MOV  SUBTAB@(R1),R1   * load the sub-routine address
       BL   *R1              * branch to it

 

...lee

Edited by GDMike
Link to comment
Share on other sites

So in this particular case, you write it like this, since the index into the table is fixed, and you already know both the index and that it needs to be mulitplied by two. Hence there's no reason to let the CPU calculate that each time. The assembler can do it at assembly time instead.

It's different if the SUBTAB index can vary, and is calculated by some other code before this snippet, of course.

SUBTAB DATA SUB0,SUB1,SUB2,SUB3,SUB4,SUB5,SUB6
       MOV  @SUBTAB+(3*2),R1   * load the sub-routine address
       BL   *R1              * branch to it

 

Edited by apersson850
  • Like 2
  • Thanks 1
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...