Jump to content
  • 0
Raongodz

Basic in line assebler

Question

is there going to be, or could there be, an in line assebler in basic similar to that of the bbc computers bbc basic?  It's a great tool for experimenting and learning  

  • Like 2

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

While that would be cool, I think it's not likely at this point. The team IS building a ROM based assembler IDE, which will be much more powerful than BBC BASIC's assembly. You should be able to drop in and out of the assembly editor at any time, so you would just need to use SYS statements to run assembly subroutines from BASIC. 

With the planned BASIC editor, which will not require line numbers, the CX16's code editing will be more advanced than any 80s micro. 

  • Like 3

Share this post


Link to post
Share on other sites
  • 0

Yeah, assembly in-line with a BASIC program is a great concept, but I agree with @TomXP411 that this overlaps significantly with the other assembly IDE in the system. Then again, maybe the core code there could be reused and called from BASIC?

  • Like 3

Share this post


Link to post
Share on other sites
  • 0
8 hours ago, Michael Steil said:

Yeah, assembly in-line with a BASIC program is a great concept, but I agree with @TomXP411 that this overlaps significantly with the other assembly IDE in the system. Then again, maybe the core code there could be reused and called from BASIC?

The more I think about it, the more it seems possible... you could do it a couple of different ways, but I like this syntax: 
 

 so something like....

100 PRINT "HELLO ASSEMBLY"
110 ASM BEGIN
120 do assembly stuff
150 ASM END 

When the program is RUN, the parser would iterate through the program, look for any ASM blocks, and pass them in to the assembler IDE. That would allocate a chunk of RAM in upper memory and run the assembly code up there. 

However, I'm still at the "I'm not sure there's a benefit" stage, when I could just as easily hit F4 (or whaetever), write my assembly code there, and just run it from the main program with BANK, LOAD, and then SYS. 

Maybe this would be a good "2.0" project, once the basic machine is working, and you're looking for incremental enhancements.

 

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
On 7/2/2020 at 7:11 AM, TomXP411 said:

While that would be cool, I think it's not likely at this point. The team IS building a ROM based assembler IDE, which will be much more powerful than BBC BASIC's assembly. You should be able to drop in and out of the assembly editor at any time, so you would just need to use SYS statements to run assembly subroutines from BASIC.

What would be nice is a SYSLOAD keyword to move the top of basic down to just below the top of the address of the PRG file specified in the LOAD, so you could work on the Assembly routine in the Assembler IDE, save it as a PRG, and then SYSLOAD it from Basic and you are ready to do SYS calls into that assembled code.

  • Like 1

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)
19 hours ago, BruceMcF said:

What would be nice is a SYSLOAD keyword to move the top of basic down to just below the top of the address of the PRG file specified in the LOAD, so you could work on the Assembly routine in the Assembler IDE, save it as a PRG, and then SYSLOAD it from Basic and you are ready to do SYS calls into that assembled code.

Actually, the Tandy 100 uses the CLEAR command to do allocate memory for ML routines. And that's legit Microsoft BASIC - it was the last project Bill Gates personally developed. 

CLEAR with no arguments simply erases variable

CLEAR address sets the top of BASIC so that address is available. So if you set CLEAR 32768, the space between 32768 and the top of low RAM would be available for ML co-routines.  (So to be clear.....  CLEAR 32768 actually sets the top of BASIC pointer to 32767).

While SYSLOAD seems like a nice keyword to use, CLEAR makes it abundantly clear that this resets all variables.....

 

Edited by TomXP411
  • Like 1

Share this post


Link to post
Share on other sites
  • 0

My idea there is that you don't need the address, but OTOH, you need to know the address to do the syscall.

I guess to be completely " implied address", it should be USRLOAD"file"[,dev] and put the start address of the binary in the USR locale.

Share this post


Link to post
Share on other sites
  • 0
On 7/2/2020 at 12:11 AM, TomXP411 said:

While that would be cool, I think it's not likely at this point. The team IS building a ROM based assembler IDE, which will be much more powerful than BBC BASIC's assembly. You should be able to drop in and out of the assembly editor at any time, so you would just need to use SYS statements to run assembly subroutines from BASIC. 

With the planned BASIC editor, which will not require line numbers, the CX16's code editing will be more advanced than any 80s micro. 

The reason I would want it is for playing with assembler rather than it being a serious app dev option.

  • Like 1

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
Answer this question...

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


×
×
  • Create New...

Important Information

Please review our Terms of Use