Jump to content
9640News

MyBasic 4.05 Docs-Program-Src

Recommended Posts

2 hours ago, 9640News said:

ve taken a quick look trying to find the source file where this may be defined, but thus far, it is eluding me.  I'm reporting here should anyone want to chase it down and find it before I have additional time to find it. 

Beery, I suggest testing the same program using ABASIC v3.0 and 4.04.  Although I find this unlikely, it sounds as if the TIME$ routine might have been affected by a 4-digit year update.  The OS XOPs do not pass a 4-digit year, however, I seem to recall discussing time/date with Jim long, long ago.  If you don't sort it out by the weekend I'll check my source files and fix notes for any clues.  See next post.

Share this post


Link to post
Share on other sites

I searched for TIME$ (Git did a nice job finding it) which led me to 162\STRFUNCT.TXT, a quick glance of the routine seems like the TIME function is tied into the date routine, where Jim extended the year string length.  It looks as if Jim is testing for "99" (the year he added the comment) and adding "20" if it is anything besides 99.  Somehow you'll need to skip this code for the TIME$ function or remove the addition of the "20" altogether.  I don't know what abasic programs were built to rely on the full 4-digit year, if any, and I have no strong opinion as to whether 2- or 4- digit year is better

 

I added a few notes to the code below.  Sorry, the spacing was stripped :(

 

NDATE$ LI R0,X$CDS LOAD OP-CODE
NDA10 LI R1,STRBUF-2 STRINGS ADDRESS
LI R2,254 SIZE OF BUFFER
MOV R2,*R1+ WRITE IT
XOP @NINE,0
 
LI R1,>3939
C @STRBUF+6,R1 added yr to date 04-23-99ju
JEQ XD99 <<<<< ----- if year '99', skip adding '20'. 
MOV @STRBUF+6,@STRBUF+8
LI R1,>3230 <<<<<< ----- this is "20"
MOV R1,@STRBUF+6

JMP XDONE

 

; This time function jumps into the Date function but there is no test to skip "20" and since the seconds field never equals 99, it is always added...

NTIME$ LI R0,X$CTS LOAD OP-CODE
JMP NDA10
  • Like 2

Share this post


Link to post
Share on other sites

Thanks Tim.  After my post last night, I went through each file there was and could not find the code.  Thanks for finding the piece of code.  It will be this weekend before I can get into fixing anything with it.

 

Per the Advanced Basic manual, and I am inclined to not change the manual, the DATE$ should report:

 

07/15/21

 

while the TIME$ should report:

 

07:08:00 

 

style format.

 

I will need to make sure fixing one doesn't break the other.  As there are so very few Advanced Basic programs, I think it is very low risk any changes good or bad or with the bug have been impacted.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, 9640News said:

I will need to make sure fixing one doesn't break the other.  As there are so very few Advanced Basic programs, I think it is very low risk any changes good or bad or with the bug have been impacted.

Agree.  I think the fix in this section is simple if you change it to conform to the manual; I would just look closely at the XDONE routine and following to verify whether or not the length of the string is dependent on anything.  The snip of code I copied (above) does not seem to account for an increase in length, and the buffer appears to be set to a length of 254, so I would assume the subsequent functions are looking for white space or some other indicator that we aren't seeing.  

Share this post


Link to post
Share on other sites
1 hour ago, InsaneMultitasker said:

Agree.  I think the fix in this section is simple if you change it to conform to the manual; I would just look closely at the XDONE routine and following to verify whether or not the length of the string is dependent on anything.  The snip of code I copied (above) does not seem to account for an increase in length, and the buffer appears to be set to a length of 254, so I would assume the subsequent functions are looking for white space or some other indicator that we aren't seeing.  

I'm going to go back and look at the original source file I acquired from Myarc to see how the DATE$ and TIME$ routines were coded since they were intertwined.  I am also going to post a note in another topic to see how the CorComp triple tech card reports date just to make sure there may not be something else I could be overlooking as I doubt very few TripleTech users are following this thread.


Beery

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, 9640News said:

I'm going to go back and look at the original source file I acquired from Myarc to see how the DATE$ and TIME$ routines were coded since they were intertwined.  I am also going to post a note in another topic to see how the CorComp triple tech card reports date just to make sure there may not be something else I could be overlooking as I doubt very few TripleTech users are following this thread.


Beery

Not currently using it, but do have a triple tech and am following the thread. Let's not assume!!! Lol😆

  • Haha 3

Share this post


Link to post
Share on other sites
On 7/16/2021 at 10:06 PM, 9640News said:

Per a private request, I have uploaded the original V3 Advanced Basic source code to Github at BeeryMiller/Abasic-V3 (github.com)

 

The version 4.07 source code update will be this weekend at BeeryMiller/ABasic: ABasic for MDOS (github.com) and I will post the compiled image here.

 

Beery

 

 

ABASIC-407.zip

  • Like 4
  • Thanks 2

Share this post


Link to post
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.

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...