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 : Interest in On-System Assembler?
Author | Message | ||||
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 341 |
Would there be any interest in an assembler written in MMBasic that generates the CSUB and hex codes which can be included in a BASIC program? I don't want to spend much time developing one if there's not much interest but I can see where it might be useful. |
||||
JoOngle Regular Member Joined: 25/07/2020 Location: SwedenPosts: 82 |
I for once have wished for an In-System assembler since the start. Had the commodore 64 as a 13 Year kid, and 1 month later got the HesMon 64 Assembler for testing by a computer magazine, and I was hooked ever since, especially since we could do so much more faster routines, we frequently added assembly/machine code to our games / demo's as the C64 was only 1 MHz. However - one of the charming parts with the CMM2 is that it's hideously fast even in BASIC, so it's actually possible to make GAMES IN BASIC that's as fast as a C64 and even faster. But if you made such an assembler, I'd probably use it :) |
||||
mkopack73 Senior Member Joined: 03/07/2020 Location: United StatesPosts: 261 |
Certainly wouldn’t say no to having that. Anything that allows us to do more development directly on the CMM2 the better... This includes tools such as sprite, graphics and Font editors, assemblers, etc. Honestly what we have seen in terms of evolution of this platform in the 6 months since it was announced to the wider audience via 8bit guy and others is nothing short of amazing. Can’t wait to see what the next 6 months brings us as more people get machines and we all learn how to do even more on them! I just wish I had more free time to work on it. |
||||
Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 554 |
Iam interested in Plasma |
||||
jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
I have written core ARM assembler as preparation for CMM2 (I was waiting for shipment), but I was wrong and have written it for ARM, not for Thumb-2 Anyway is in XOJO (BASIC dialect), so maybe still can be partially used... ARM asm Bigger problem I see in missing call of assembler from MMBasic, you have just CSUB (still very good). It will be perfect, when you can write ASM source at least in some online Thumb 2 assembler and then copy binary result into MMBasic code. I was using for example this or this. Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 341 |
I'll probably write the assembler to use UAL so that should take care of that problem. Since CSUBs usually are just small functions to be called from BASIC rather than a complete project, I will probably not make a macro assembler. There's no need to get fancy. This will just be a quick way to avoid having to hand-assemble small amounts of code. |
||||
irich2 Newbie Joined: 21/07/2020 Location: United StatesPosts: 4 |
Definitely interested in an On-System Assembler! I would love that! Would it be too much harder to add the functionality of a "System Monitor" type program, like the old Apple II had? Something that would allow you to examine and modify memory contents? |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9386 |
This is a seriously non-trivial exercise. Below one bit of the magic behind the speed of the CMM2 for you to enjoy. 08081680 <_Z10copy_wordsPKmPmm>: 8081680: ed2d 8a10 vpush {s16-s31} 8081684: 0852 lsrs r2, r2, #1 8081686: bf24 itt cs 8081688: ecb0 0a01 vldm ia cs r0!, {s0} 808168c: eca1 0a01 vstm ia cs r1!, {s0} 8081690: 0852 lsrs r2, r2, #1 8081692: bf24 itt cs 8081694: ecb0 0a02 vldm ia cs r0!, {s0-s1} 8081698: eca1 0a02 vstm ia cs r1!, {s0-s1} 808169c: 0852 lsrs r2, r2, #1 808169e: bf24 itt cs 80816a0: ecb0 0a04 vldm ia cs r0!, {s0-s3} 80816a4: eca1 0a04 vstm ia cs r1!, {s0-s3} 80816a8: 0852 lsrs r2, r2, #1 80816aa: bf24 itt cs 80816ac: ecb0 0a08 vldm ia cs r0!, {s0-s7} 80816b0: eca1 0a08 vstm ia cs r1!, {s0-s7} 80816b4: 0852 lsrs r2, r2, #1 80816b6: bf24 itt cs 80816b8: ecb0 0a10 vldm ia cs r0!, {s0-s15} 80816bc: eca1 0a10 vstm ia cs r1!, {s0-s15} 80816c0: f000 8006 beq.w 80816d0 <_Z10copy_wordsPKmPmm+0x50> 80816c4: ecb0 0a20 vldm ia r0!, {s0-s31} 80816c8: eca1 0a20 vstm ia r1!, {s0-s31} 80816cc: 3a01 subs r2, #1 80816ce: d1f9 bne.n 80816c4 <_Z10copy_wordsPKmPmm+0x44> 80816d0: ecbd 8a10 vpop {s16-s31} 80816d4: 4770 bx lr |
||||
yock1960 Senior Member Joined: 18/08/2020 Location: United StatesPosts: 167 |
I just checked and ChibiAkumas DOES have a series on ARM Assembly programming! But seriously, CSUBS are enough for me I think and if I ever get around to actually doing the Serial Console thing, so I can quit popping the SD in and out, not having native 'everything' will be okay. Steve |
||||
jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
With Napoleon Commander you don't need pop the SD, you can copy through serial and still work natively... Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 487 |
The last time I develop something using Assembly for a physical processor was in the 90s for my old MSX Z80 processor and for a virtual processor was for my processor simulator using LogiSim (https://github.com/leonicolas/computer-8bits) 2 years ago Edited 2020-12-09 16:08 by LeoNicolas |
||||
yock1960 Senior Member Joined: 18/08/2020 Location: United StatesPosts: 167 |
Jiri, One of these days...sometime real soon...I'm going to try that serial console thing! Steve |
||||
jirsoft Guru Joined: 18/09/2020 Location: Czech RepublicPosts: 533 |
Jiri, One of these days...sometime real soon...I'm going to try that serial console thing! Steve Hi Steve, I'm not using serial console, I'm programming direct on CMM2. But with NC I can make backups to Mac (PC...), when I make screenshot on CMM2, can be uploaded to Mac, I can download others people projects from internet and simple copy it to SD a immediatelly test it... Right now with NC can't be serial console used, because I block serial port for NC, so for serial console developer it make NC to too much sense (and they can use some other tools like XMODEM). Jiri Napoleon Commander and SimplEd for CMM2 (GitHub), Â CMM2.fun |
||||
Print this page |