This example shows how to write a program that uses the DOJO protocol with a FujiNet (emulated).. To work, you need to connect the retro computer ccording to the official instructions on the dedicated web site. Alternatively, you can use an appropriately configured emulator. For more information: https://dojo.ugbasic.iwashere.eu/
source
compile
sandbox
issues?
back to examples
DEFINE DOJO ON FUJINET CLS PRINT "===========================" PRINT "DOJO CHAT CLIENT ON FUJINET" PRINT "===========================" PRINT DO PRINT "Digit ID or leave blank for new:" INPUT roomId$ digits = LEN(roomId$) IF digits <> 8 AND digits <> 0 THEN PRINT "ID must be of eight hex digits." ELSE IF digits = 0 THEN port = CREATE PORT() myChannel = 0 otherChannel = 1 ELSE port = OPEN PORT(roomId$) myChannel = 1 otherChannel = 0 ENDIF IF DOJO ERROR > 0 THEN PRINT "Invalid port or unavailabe service." ELSE PRINT "Room ID: ";port PRINT EXIT ENDIF ENDIF LOOP DO IF PEEK MESSAGE(port, myChannel) THEN PRINT GET MESSAGE(port, myChannel) ENDIF INPUT "> ",message$ PUT MESSAGE port, otherChannel, message$ LOOP
The instructions here refer to compiling the example from the command line. For Microsoft Windows
users we suggest using UGBASIC-IDE, which allows
you to download and compile each single example with just one click.
Are instructions for your specific home computer / console missing? First of all, check if your computer
is supported by clicking here. If so, since ugBASIC is a language which does not provide abstractions, it is possible
that this example will not work on your target. If you think this is an issue, please click here.
In order to compile the example, type this command on the command line:
Linux
ugbc.atari -O xex -o dojo_chat_fujinet.xex dojo_chat_fujinet.bas
Windows
ugbc.atari.exe -O xex -o dojo_chat_fujinet.xex dojo_chat_fujinet.bas
For Microsoft Windows users we suggest using UGBASIC-IDE, which allows
you to download and compile this example with just one click.
In order to compile the example, type this command on the command line:
Linux
ugbc.coco -O bin -o dojo_chat_fujinet.bin dojo_chat_fujinet.bas
Windows
ugbc.coco.exe -O bin -o dojo_chat_fujinet.bin dojo_chat_fujinet.bas
For Microsoft Windows users we suggest using UGBASIC-IDE, which allows
you to download and compile this example with just one click.
If you have found a problem trying to run this example, if you think there is a bug or, more
simply, you would like it to be improved, open an issue for this example on GitHub.
Thank you!
open an issue
BACK TO EXAMPLES