[Oberon] FPGA - Oberon0 Commands
andreas_pirklbauer at yahoo.com
Mon Sep 3 16:29:16 CEST 2018
>  How to start PCLink safely (command 6), not to block and stay within Oberon0 loop?
>  How to load System module, and execute its commands, not leaving Oberon0 loop, and not booting into Oberon system.
>  How to run ORP.Compile within the Oberon0 loop
IF you have Oberon0, you don’t also need PCLink1, as Oberon0 also contains the commands to send/receive files.
PCLink1.Stop # stop the PCLink1 background task if it is running (as it uses the same RS232 queue as Oberon0)
Oberon0Tool.Run # start the Oberon-0 command interpreter as an Oberon background task
You’d have to create a special version of module Oberon, say OberonSpecial.Mod, where the last line
Modules.Load("System", Mod); Mod := NIL; Loop
is replaced by
IF Modules.importing # "Oberon" THEN (*loaded by the boot loader*) Modules.Load("System", Mod); Mod := NIL; Loop END
and compile it:
ORP.Compile OberonSpecial.Mod ~
Then restart the target system over the serial link, and on the host system execute the following commands:
ORC.Load Oberon0.bin # load the Oberon-0 command interpreter over the serial link to the target system and start it
ORC.SR 101 ~ # clear the file directory on the target system
ORC.Send Input.rsc Display.rsc Viewers.rsc
Fonts.rsc Texts.rsc Oberon.rsc MenuViewers.rsc TextFrames.rsc
System.rsc System.Tool Oberon10.Scn.Fnt
Modules.bin BootLoadDisk.rsc Oberon0.rsc Oberon0Tool.rsc
Edit.rsc PCLink1.rsc ORP.rsc ORG.rsc
ORB.rsc ORS.rsc ORTool.rsc ~ # send the required (plus some additional) files to the target system
This will transfer all the object files (where Oberon.rsc was built from OberonSpecial.Mod!), to the target system:
Then, again on the host system, remotely execute any command from module System, for example:
ORC.SR 22 System.Watch
BUT: Why would want to do that? You now have a running Oberon system with the viewers open, but *without* the central loop Oberon.Loop running.
You can (remotely) load the compiler on the *target* system by executing the command
ORC.SR 22 ORP.Compile ~
on the *host* system. HOWEVER, the command ORC.SR 22 M.P does *not* transmit any parameters from the host to the target system. So this is really not a useful application of the ORC.SR 22 M.P ("call command")
Not passing parameters was a deliberate design choice, see paragraph 6 of [*]) why this decision was made.
This restriction could easily be lifted, but I don’t quite see the point. If you need to compile a program, just compile it on the host, rather than on the target system, and then download the generated object file using ORC.Send.
More information about the Oberon