Jump to content
IGNORED

XB Program to Binary


Shift838

Recommended Posts

I thought I saw this that it could be done but I can't seem to find it so I thought I would ask. Can a extended basic program be compiled to a binary program so that it could be stored on an sd card for say the finalgrom or flashrom99 cartridge?  If so, how?

  • Like 1
Link to comment
Share on other sites

Yep excellent programs to make XB into Binary or Assembly.

 

But can you still call them XB anymore after that as now they are pure Assembly now.

Also they will not run from Console anymore without a 32K Assembly support routines that use CALL LINK

Link to comment
Share on other sites

I tried various different XB compilers and this particular program will not assemble it gets an error.  I know certain things in XB will not compile correctly.

 

What I am wanting to do is to have a program for an MBP clock that will set the time and date as well as read it and I wanted it to be able to assemble into a binary to store onto a FinalGrom cart.  Maybe someone has one already?

 

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, Shift838 said:

I tried various different XB compilers and this particular program will not assemble it gets an error.  I know certain things in XB will not compile correctly.

 

What I am wanting to do is to have a program for an MBP clock that will set the time and date as well as read it and I wanted it to be able to assemble into a binary to store onto a FinalGrom cart.  Maybe someone has one already?

@senior_falcon might be able to assist you.

  • Like 1
Link to comment
Share on other sites

22 hours ago, OLD CS1 said:

No.  We call it "compiled Extended BASIC."  The program is still written in Extended BASIC, however.

Really remove the 32K and does it still run?

Pretty sure with out a 32K the CALL LINK will not work,

but you know I have only been working on XB for 25 years.

Edited by RXB
missing text
Link to comment
Share on other sites

Prick me; do I not bleed?

20 minutes ago, RXB said:

Really remove the 32K and does it still run?

Depends upon the XB program, right?  Not all XB can fit in 12k, right?

21 minutes ago, RXB said:

Pretty sure with out a 32K the CALL LINK will not work,

Assuming he is using CALL LINK.  He might just be using OPEN, CLOSE, DISPLAY AT, and ACCEPT AT.  Dunno.  I have not seen the program.  Have you?

21 minutes ago, RXB said:

but you know I have only been working on XB for 25 years.

Dick measuring, Rich?  C'mon, now.

  • Like 2
Link to comment
Share on other sites

TI had a method of relocating TI BASIC programs into cartridge GROM space (used extensively in the ScottForesman educational cartridges), allowing much larger BASIC programs, but that mode did not extend to Extended BASIC. Your best bet might be to make a short program stored in the MiniMemory and then save the contents to make a ROM image of the space. . .it would need the MM, but that might work.

  • Like 1
Link to comment
Share on other sites

5 hours ago, OLD CS1 said:

Prick me; do I not bleed?

Depends upon the XB program, right?  Not all XB can fit in 12k, right?

Assuming he is using CALL LINK.  He might just be using OPEN, CLOSE, DISPLAY AT, and ACCEPT AT.  Dunno.  I have not seen the program.  Have you?

Dick measuring, Rich?  C'mon, now.

FACT! Experience matters more then false claims based on not knowing about the subject.

No I have not seen the program but why would you need it compiled,  if it is normal XB?

After all Normal XB can not run Binary files designed for XB GEM.

I am just stating facts not anything else.

Link to comment
Share on other sites

5 minutes ago, RXB said:

No I have not seen the program but why would you need it compiled,  if it is normal XB?

Simple observation:

On 8/25/2024 at 2:28 PM, Shift838 said:

What I am wanting to do is to have a program for an MBP clock that will set the time and date as well as read it and I wanted it to be able to assemble into a binary to store onto a FinalGrom cart.

Now, what I would like to do is stop bickering over this personal offense nonsense caused by incomplete observation and leave @Shift838's thread at least partially intact for his purposes.  Can we do that, please?  (I am asking rhetorically; I am saying this side-conversation stops here.)

  • Like 3
Link to comment
Share on other sites

Let's see if we can get back on track.  Below is one of the pieces of code I would like to compile so that I could make it a binary file and store it on a FinalGrom for easy testing of MBP cards that I am working on.

 

This code sets the time/date.  If I could get this assembled, then converted to a .bin then I could work from there to put in the logic that I want and redo the process and of course code another section to be able to read the clock/date.

 


10 REM *******************
20 REM **               **
30 REM ** MBP CLOCK SET **
40 REM **               **
50 REM *******************
100 REM THIS PROGRAM IS USED TO SET THE CLOCK ON A MBP CARD.
110 CALL CLEAR
116 DISPLAY AT(1,4):"MBP CLOCK SET PROGRAM"
120 CALL INIT
130 DEF SET=X+6*INT(X/10)! CONVERTS DECIMAL TO BCD FOR OUTPUT TO CLOCK.
140 DISPLAY AT(3,1):"MONTH 1-12:" :: ACCEPT AT(3,12):X
150 MO=SET
160 DISPLAY AT(4,1):"DAY OF MONTH 1-31:" :: ACCEPT AT(4,19):X
170 D=SET
180 DISPLAY AT(5,1):"DAY OF WEEK 1-7(SUN=1):" :: ACCEPT AT(5,24):DW
190 DISPLAY AT(6,1):"HOUR 0-23:" :: ACCEPT AT(6,11):X
200 H=SET
210 DISPLAY AT(7,1):"MIN 0-59:" :: ACCEPT AT(7,10):X
220 M=SET
230 DISPLAY AT(8,1):"SECONDS 0-59:" :: ACCEPT AT(8,14):X
240 S=SET
250 CALL LOAD(-31164,S,O,M,O,H2O,DW,O,D,O,M0)! SET CLOCK
260 CALL SOUND(1,20000,30)! RESET SOUND GENERATOR
270 CALL CLEAR
280 DISPLAY AT(10,1):"MBP CLOCK HAS BEEN SET!"
290 END

 

Link to comment
Share on other sites

I see a couple of errors in the code:

 

120 CALL INIT          This cannot be used in a compiled program. I should be able to change the compiler to ignore CALL INIT

 

130 DEF SET=X+6*INT(X/10)! CONVERTS DECIMAL TO BCD FOR OUTPUT TO CLOCK.

From the manual: DEF        a line with DEF will be omitted by the compiler (I checked and it is indeed omitted)

 

250 CALL LOAD(-31164,S,O,M,O,H2O,DW,O,D,O,M0)! SET CLOCK

This will poke those 10 values to >8644. I assume that is what the clock needs in order to set it, but am mentioning it in case that is the wrong address.

 

I think the program should compile and work if you fix lines 120 and 130.

You could change the DEF to a GOSUB

1000 X=X+6*INT(X/10)::RETURN

then

150 GOSUB 1000::MO=X

170 GOSUB 1000::D=X

and so on..

 

@OLDCS1: I don't think the calculations result in any floating point numbers.

Edited by senior_falcon
  • Like 5
Link to comment
Share on other sites

9 hours ago, Ksarul said:

A thought: isn't the MBP clock compatible with the CorComp clock? If it is, the routines to set and read that one may be usable here.

The CorComp has an actual DSR and setting the CorComp if I recall is done by OPEN #1:"CLOCK" and printing variable to the clock.  Where the MBP is a CALL LOAD statement, so no they are not compatible as far as I am aware of.

Link to comment
Share on other sites

19 minutes ago, Shift838 said:

The CorComp has an actual DSR and setting the CorComp if I recall is done by OPEN #1:"CLOCK" and printing variable to the clock.  Where the MBP is a CALL LOAD statement, so no they are not compatible as far as I am aware of.

I think the pgram clock is compatible. It has a clock DSR as well, but it also can be accessed via the 8x00 range that mbp uses.

  • Like 1
Link to comment
Share on other sites

Would not be hard to put a small amount of GPL code into any module in Final GROM to access the clock with 

most of the code very similar to what you posted in GPL instead of XB.

The GPL code would be very small compared to other approaches especially Assembly, and you could access it

from any GPL command from Basic or XB or EA Cart device prompts.

 

Just call it CLOCK and it would display the Clock values per a location on screen in the GPL program.

CLOCK would be a GPL DSR routine so anything could call it from any program that has a GPLLINK!

 

Edited by RXB
missing text
  • Like 2
Link to comment
Share on other sites

The best way to do this if you want a TI basic program (not xb) that uses call init and call load to run without 32k, is to have it designed to work with the mini-memory cartridge. That could be combined together as bin file that runs on a finalgrom99 launching as mini-memory cartridge with the basic program available to load and run.

 

Or just rewrite the whole program in pure assembly to run in the 6000 space. I remember using a program called setclock8.bin which I grabbed from whtech but not sure if that does mbp as well, it does set my pgram and Corcomp clocks but I also didn't test it without the 32k.

  • Like 2
Link to comment
Share on other sites

11 minutes ago, Gary from OPA said:

The best way to do this if you want a TI basic program (not xb) that uses call init and call load to run without 32k, is to have it designed to work with the mini-memory cartridge. That could be combined together as bin file that runs on a finalgrom99 launching as mini-memory cartridge with the basic program available to load and run.

 

Or just rewrite the whole program in pure assembly to run in the 6000 space. I remember using a program called setclock8.bin which I grabbed from whtech but not sure if that does mbp as well, it does set my pgram and Corcomp clocks but I also didn't test it without the 32k.

I would say one thing however, how many people are goning to have clocks in their systems and not have a 32k card of some kind. Most of these have to use a PEB anyway, the ones not using them are the external tipi's and the pico sidecar, at least as far as I know.

Link to comment
Share on other sites

4 minutes ago, RickyDean said:

I would say one thing however, how many people are goning to have clocks in their systems and not have a 32k card of some kind. Most of these have to use a PEB anyway, the ones not using them are the external tipi's and the pico sidecar, at least as far as I know.

Or have too many clocks. I got one on my Corcomp, one on my pgram, one on my hfdc and one my on SCSI and soon one on my ide card when it arrives, not to mention the tipi one and all in the same system, I need a app that syncs them all to the same time. As different software looks at different clocks, ugh!

Edited by Gary from OPA
  • Like 1
Link to comment
Share on other sites

2 hours ago, Gary from OPA said:

The best way to do this if you want a TI basic program (not xb) that uses call init and call load to run without 32k, is to have it designed to work with the mini-memory cartridge. That could be combined together as bin file that runs on a finalgrom99 launching as mini-memory cartridge with the basic program available to load and run.

Classic99's EDITOR/ASSEMBLER, includes RAM, in the >6000->7FFF, range. So, you can Assemble/LOAD there, than use the memory image as your .BIN.

But when running on a FinalGROM 99, you can get RAM, in the upper 4k bank, but you'll only get ROM, in the lower 4k bank.

Link to comment
Share on other sites

2 hours ago, RickyDean said:

I would say one thing however, how many people are goning to have clocks in their systems and not have a 32k card of some kind. Most of these have to use a PEB anyway, the ones not using them are the external tipi's and the pico sidecar, at least as far as I know.

the stand alone version I am testing is designed to work with my 32k sidecar.  But as stated, not many people would have a need for it.  I'm thinking of just going the route of a PEB card.

  • Like 2
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...