Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 06:33 22 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2 Assembler

Author Message
joker
Newbie

Joined: 06/02/2024
Location: Germany
Posts: 25
Posted: 10:38am 20 Apr 2024
Copy link to clipboard 
Print this post

Hi everybody,
Approximately two years ago there were some discussions in the forum about an assembler for the CMM2 which should be able to read/write CSUBs. I saw it on the wishlist of CMM2.fun, too.

Has this topic continued in the last two years?
Is anybody working on an assembler/disassembler?

Best Regards
 Matthias
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3866
Posted: 03:27pm 20 Apr 2024
Copy link to clipboard 
Print this post

I'm not aware of it having gone anywhere Matthias, perhaps you could provide a link to the original thread ?

Unfortunately our community (at least the active parts of it) has a dearth of programmers with anything approaching the skill-set.

Peter might be capable if there were twice as many hours in the day (I'd require x5), maybe two or three others ... possibly ... what's your skill-set ?

Even if it was done would it be used enough to merit the effort ?

Best wishes,

Tom
Edited 2024-04-21 01:32 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8610
Posted: 05:06pm 20 Apr 2024
Copy link to clipboard 
Print this post

Writing an assembler for the CMM2 would be an enormous undertaking - probably a bigger job than the CMM2 firmware itself.

Have a look at this
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3866
Posted: 05:31pm 20 Apr 2024
Copy link to clipboard 
Print this post

  matherp said  Have a look at this


That's a file on your local D:/ drive.

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8610
Posted: 05:41pm 20 Apr 2024
Copy link to clipboard 
Print this post

Oops
 
joker
Newbie

Joined: 06/02/2024
Location: Germany
Posts: 25
Posted: 01:00pm 21 Apr 2024
Copy link to clipboard 
Print this post

Hallo,
I'm referring to
https://www.thebackshed.com/forum/ViewTopic.php?TID=13184&PID=160570#160570#160570
where someone did an assembler in another Basic dialect. I studied the source (https://github.com/jirsoft/ARM2CSub) and it doesn't look that complicated.

By the way: Thanks for the datasheet about the command set   . I have already a whole bunch of them, beacause there is not only one ARM assembler as I have learned. Nevertheless, it will help me understanding the differences.

I'm highly interested in learning more about RISK architecture and the CMM2 is my road to  it. So, the "merit" question is not really important for me.

I have written software for almost 40 years now, starting with Basic/Assembler on a C64, Assembler/C on an Amiga, C,C++,python,Java on GNU/Linux. I don't know if by skills are sufficient enough writing an Assembler for the CMM2. I haven't done this before, but this is part of the fun, isn't it?

If you want to learn more about my programming skills I would recommend to have a look on my work:Air Rescue, Fort Micromite and CMM2Profiler and see for yourself.

Best Regards
  Matthias
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3682
Posted: 04:41pm 21 Apr 2024
Copy link to clipboard 
Print this post

Sounds like you could do it... A pretty big effort, though.

John
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3866
Posted: 11:11am 22 Apr 2024
Copy link to clipboard 
Print this post

  joker said  Hallo,
I'm referring to
https://www.thebackshed.com/forum/ViewTopic.php?TID=13184&PID=160570#160570#160570
where someone did an assembler in another Basic dialect. I studied the source (https://github.com/jirsoft/ARM2CSub) and it doesn't look that complicated.


Ah, I vaguely remember now, shortly before life and work overwhelmed @jirsoft.

I didn't pay a lot of attention at the time as my involvement would have been all talk and no trousers. Ideally I guess we would want inline assembler (c.f. BBC Micro), which assuming you could get assembly on the CMM2 to work at all (in BASIC or otherwise) it probably wouldn't be too great a leap to move it into the firmware.

  joker said  I have written software for almost 40 years now, starting with Basic/Assembler on a C64, Assembler/C on an Amiga, C,C++,python,Java on GNU/Linux. I don't know if by skills are sufficient enough writing an Assembler for the CMM2. I haven't done this before, but this is part of the fun, isn't it?


Sounds like you might be the man for the job .

  joker said  If you want to learn more about my programming skills I would recommend to have a look on my work:Air Rescue, Fort Micromite and CMM2Profiler and see for yourself.


I pay a casual interest but at the moment if I spend much time looking at other people's projects I don't have enough left for my own. Nevertheless keep up the good work .

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
PeteCotton

Guru

Joined: 13/08/2020
Location: Canada
Posts: 317
Posted: 10:26pm 22 Apr 2024
Copy link to clipboard 
Print this post

Building an Assembler would be an interesting challenge.

I suspect a limited subset (MOV, MVN, CMP, LDR, ADD, SUB, MUL, AND, OR, LSL etc.) wouldn't be too hard to implement, something like just the commands for moving variables between memory registers/locations which would allow for functions that do mass sorting, or fast algorithms. These could be pointed at BASIC arrays in memory or graphics memory banks to ensure that it stuck to reserved memory.

But the cortex processors appear to be a significant step beyond 6502 or 68000 assembly, with a multitude of quite complex commands, interrupts and memory manipulation (Note: I cannot program ARM assembly - but I was pretty proficient with 6809E and Z80 back in the day). I don't know how deep this rabbit hole goes, but I think a full implementation might be fraught with issues. And then of course, there's the fact that it would have to co-exist with another program (the BASIC interpreter) and not step on each other's toes.

Even then, I'm talking about a separate Assembler program written in BASIC that would spit out the machine code for the CSUB, which could then be saved to disc (as a BASIC program with a CSUB) and then loaded into memory (replacing the Assembler program in memory) and executed. I think trying to do an inline one (where it is part of the BASIC editor) might be a bridge too far to begin with.

But the real question is - Why? The CMM2 BASIC is fast - I mean really fast. Sure, you can eventually hit the limit of what it can do, but isn't that part of the fun of programming it? Finding those limits and working within them. If we want an infinitely powerful computer, then we could just run MMBasic for Windows on a pc. Also, many of the functions (moving chunks of memory between graphics pages) are probably already so heavily tuned, that being able to do it in assembly probably isn't going to gain you much.

Having thrown up all of those road blocks - I don't want to dissuade anyone from doing this - I think it would be fascinating, but the reasons for doing it might not be as straightforward as we think.

Of course, a good reason to do it would be as a learning tool for ARM assembly language.  
Edited 2024-04-23 08:28 by PeteCotton
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5776
Posted: 09:15am 23 Apr 2024
Copy link to clipboard 
Print this post

I was banging my head against the wall just doing an assembler for the PIO. It's non-trivial when you have multiple arguments for each instruction.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024