Basic in line assebler

If you have feature requests, this is the place to post them. Please note your idea may already be something we have already discussed and decided against, or something we are working on privately, and we cannot be held responsible for any similarities in such instance. Whilst we cannot respond to every suggestion, your idea will be read and responded to where possible. Thank you for your input!
Post Reply
Raongodz
Posts: 6
Joined: Mon Jun 29, 2020 7:57 pm

Basic in line assebler

Post by Raongodz »


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  

TomXP411
Posts: 1788
Joined: Tue May 19, 2020 8:49 pm

Basic in line assebler

Post by TomXP411 »


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. 

Perifractic
Posts: 511
Joined: Sat Apr 25, 2020 4:53 pm

Basic in line assebler

Post by Perifractic »


Pinging @Michael Steil on this one...

Michael Steil
Posts: 94
Joined: Mon May 18, 2020 7:25 pm

Basic in line assebler

Post by Michael Steil »


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?

TomXP411
Posts: 1788
Joined: Tue May 19, 2020 8:49 pm

Basic in line assebler

Post by TomXP411 »



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.

 

BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

Basic in line assebler

Post by BruceMcF »



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.

TomXP411
Posts: 1788
Joined: Tue May 19, 2020 8:49 pm

Basic in line assebler

Post by TomXP411 »



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



 

BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

Basic in line assebler

Post by BruceMcF »


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.

Raongodz
Posts: 6
Joined: Mon Jun 29, 2020 7:57 pm

Basic in line assebler

Post by Raongodz »



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.

Post Reply