R800.COM and Z80.COM

R800.COM and Z80.COM

by Meits on 17-08-2017, 23:10
Topic: Software
Tags: r800, z80
Languages:

In the later COMMAND2.COM versions we were spoilt with a lot of very convenient new commands and tools. One of them is the CPU command for the turbo R users where just CPU tells you in which mode you're currently running. By adding 0, 1 or 2 you can switch to z80, R800-RAM and R800-ROM. But this is only when in DOS.

gdx created the files R800.COM and Z80.COM which will do what you expect them to do. The positive catch to both file is that they're not only executable from the DOS prompt, but BLOAD-able from Basic as well.

Check the download which includes both .COM files as well as accompanying txt files but as cherry on the cake, the sources as well.

Comments (11)

By N.I

Master (163)

N.I's picture

18-08-2017, 05:10

I saw a BLOAD-able com file for the first time. It works well. I am happy because I mainly use BASIC.
It seems that it is loaded at F67Ah. What area is it for?

By NYYRIKKI

Enlighted (5382)

NYYRIKKI's picture

18-08-2017, 10:34

Well... There is also single file version that does all the same... Also BLOAD-able COM file...

https://www.msx.org/forum/development/msx-development/new-so...

By Manel46

Champion (431)

Manel46's picture

19-08-2017, 13:42

That's how I do it

LD A,(2DH)
CP 3 ;Turbo-R?
JR NZ,NOT_TR
LD A,80H ;Z80 ROM, 81H R800 ROM, 82H R800 DRAM
CALL 180H
NOT_TR

By N.I

Master (163)

N.I's picture

21-08-2017, 08:08

I'm amazed that there are many ways.

By NYYRIKKI

Enlighted (5382)

NYYRIKKI's picture

21-08-2017, 20:42

Whee, today EASYCPU has 10th birthday!
If you scroll all the way down in here:
https://www.msx.org/wiki/R800_Programming

You can also find the "ALLYOURBASEAREBELONGTOUS!"-BASIC version. That works on DOS as well. :)

By Grauw

Ascended (8451)

Grauw's picture

21-08-2017, 22:41

That’s the best one!

By N.I

Master (163)

N.I's picture

22-08-2017, 12:39

NYYRIKKI wrote:

https://www.msx.org/wiki/R800_Programming

You can also find the "ALLYOURBASEAREBELONGTOUS!"-BASIC version. That works on DOS as well. :)

Indeed, that is the ingenious way. :o It seems very difficult to link BASIC's memory to machine language.
And Happy Birthday, EASYCPU!

By Louthrax

Prophet (2082)

Louthrax's picture

22-08-2017, 12:59

NYYRIKKI, I was totally unaware of the possibility of an extra parameter after the BLOAD"file",r. That's great, and if it works with strings I could simplify some of my tools (that are still using DEFUSR that needs to point to the right address...)

By gdx

Prophet (3035)

gdx's picture

22-08-2017, 16:32

I did not know EASYCPU. Nice tip!

By Grauw

Ascended (8451)

Grauw's picture

22-08-2017, 17:54

Louthrax wrote:

NYYRIKKI, I was totally unaware of the possibility of an extra parameter after the BLOAD"file",r. That's great, and if it works with strings I could simplify some of my tools (that are still using DEFUSR that needs to point to the right address...)

It’s NYYRIKKI trickery. The parameter is a load address offset value.

By gdx

Prophet (3035)

gdx's picture

24-08-2017, 11:33

The R800 RAM mode option is not really necessary because it's the default mode of Basic and of DOS2 on Turbo R. In addition, it is recommended to switch into this mode only during or just after the boot.