I've added some enhancements and bugfixes to the C0DE single-line assembler
in CloudT.


   1. For raw and #-encode, ASCII 127 (DEL) and ASCII 34 (") are now
   considered special characters in a literal string. For raw mode they're
   encoded with CHR$() and for #-encode mode they get a #-escaped.
   2. Added DB and DW mnemonics for assembling byte and word lists.
   Examples:
   db "Hello",$0d,$0a
   db 'C," single C",$0d,$0a
   db 197
   dw $fada,255, $0a0d

Yes the single line assembler is a weird feature... but it allows me (and
you) to directly experiment with short assembly sequences directly embedded
in BASIC strings. I generally open a string, like

10 A$="
And then start assembling instructions, appending with the Raw button.
Somehow I find this more engaging than tooling up a build process / BASIC
loader generator based on a real assembler.

Eventually I think it will grow to allow more than one line, with labels,
but I'm not there yet. Doing my recent tests with rst-7 based relative
branches is pushing the limits though, since I have to count bytes manually
to determine relative branch offsets, and when I get it wrong, hilarity
ensues. We'll see. For one thing I'm not really keen on adding a third
party javascript-based text editor into CloudT.

-- John.

Reply via email to