How to run ugBasic program on dc moto

This forum is dedicated to those who want support programming in ugBASIC.
Questo forum è dedicato a chi desidera supporto per programmare in ugBASIC.
Ce forum est dédié à ceux qui souhaitent prendre en charge la programmation en ugBASIC.
Post Reply
ldir_hector
Posts: 13
Joined: Sun Oct 08, 2023 11:47 am

How to run ugBasic program on dc moto

Post by ldir_hector »

I post this on this forum as I think it is most likely I don't use this emulator correctly and there is no issue !

I try a simple hello world program, and I compiled it for Thomson MO7. I got a k7 file, which is loaded in the DC moto emulator and display a main.exe file at 000.
I use DC Moto 2022.06.15.
When I type run"main.exe"
it prints :

searching
skip: main exe
searching
and then DC moto opens a popup telling that I reached the end of the tape !

I think I am missing something, but I don't know what !
spotlessmind1975
Site Admin
Posts: 171
Joined: Fri Oct 06, 2023 8:25 pm

Re: How to run ugBasic program on dc moto

Post by spotlessmind1975 »

Hi ldir_hector!
ldir_hector wrote: Sun Oct 29, 2023 4:41 pm I think I am missing something, but I don't know what !
I think you're just missing the instructions to launch a program stored on the Thomson "tape" format (k7). In fact, it is not immediate and, at the time, I had those who were more expert than me tell me how to load it. In any case, the instructions to use are these (you can put everything on one line by using the clipboard, and pressing ENTER at the end):

Code: Select all

CLEAR,&H2FFF: LOADM"CASS:",R: EXEC
In short, and as I understand it, the meaning of the commands follows:

Code: Select all

CLEAR,&H2FFF
Move the pointer of the highest location exploitable by native BASIC to the address $2FFF. This way, RAM memory from $3000 and above can be used for loading. In other words, they RAM above $3000 will not be altered by BASIC, with its routines, perhaps called while loading from the tape.

Code: Select all

LOADM"CASS:",R
Load the first binary file on the tape, and relocate it according to the address it contains. ugBASIC usually generates binaries starting at address $3000, but this may change in the future. In this case, the previous instruction will also need to be adapted.

Code: Select all

EXEC
Finally, it runs the executable starting from the initial address present in it. Again, that address is precisely $3000.
Post Reply