BASM: Best ASseMbler in my desk room.

Started by krusty, 15:21, 06 October 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

krusty_benediction

yep, and honnestly there are limitations with the current memory function as it assumes your are adressing the same space than where you are currently.
But this is not that much fancy as winape allows it too

krusty_benediction

Not a lot of features have been implemented since December.

- I have revised some architectural choices (not totally finished yet, so there can be bugs) that should bring more assembling speed. Basm still remains slower than rasm at the source parsing step. No idea if I'll reach its speed one day.
- I have added a --progress option to see the current state of assembling for long projects to assemble (yet a WIP)
- The assembler can embed some sources files (those of the decompressors are currently included to ensure the z80 decoding code corresponds to the right coding code). They can be included using a filename starting with inner:// (now it's just a matter of finding which files to add)
- I have added more compression formats (thanks to rasm integrations I have retrieved)
- I have added a web assembly support. It means that basm can be used in a Javascript application (a web page for example). Limitations are: most compression functionalities are not available, and include/incbin of files not included inside the assembler are not available
- Still no documentation, but most directives are tested here https://github.com/cpcsdk/rust.cpclib/tree/master/cpclib-basm/tests/asm

My github continuous integration does not seem to publish the built executables. I can share the executable on demand

krusty_benediction

#27
Thanks to: https://www.cpcwiki.eu/forum/programming/z80-labels-of-firmware-calls/, basm knows all the firmware calls  for CPC 6128.
They can be used on demand.

Thus, this code


snainit "../cpclib-sna/src/cpc6128.sna" ; should be uneeded by properly specifying sna properties for rom configuration

org 0x4000
run $



ld hl, text_content
loop
ld a, (hl)
or a
jp z, finished

call TXT_OUTPUT
inc hl
jp loop

finished
jp $

text_content
db "Hello, world!", 0
include "inner://firmware/txtvdu.asm"

can be executed on CPC with this command

basm --m4 192.168.1.28 tests/asm/good_hello_world.asm

Powered by SMFPacks Menu Editor Mod