Discussion:
assemblers in emulators?
(too old to reply)
rusure
2013-03-25 11:06:58 UTC
Permalink
I don't have a Commodore emulator, I'm stuck with a real C128D
or SX64. Do any C= emulators include assemblers in their systems?
Payton Byrd
2013-03-25 13:07:17 UTC
Permalink
Post by rusure
I don't have a Commodore emulator, I'm stuck with a real C128D
or SX64. Do any C= emulators include assemblers in their systems?
VICE has a very good ML monitor.
Christian Brandt
2013-03-26 21:06:27 UTC
Permalink
Post by Payton Byrd
Post by rusure
I don't have a Commodore emulator, I'm stuck with a real C128D
or SX64. Do any C= emulators include assemblers in their systems?
VICE has a very good ML monitor.
True. Its partly even more powerful than a real machine for debugging.

You are also free to load a assembler into the ROM at $8000 which opens
up quite a lot options. Data Becker sold a pretty good assembler which I
have around somewhere as a ROM-Image. Most powerful assembler ever on
true iron. Only bad thing: It switches off the basic ROM as it occupies
$8000-$BFFF.

Though you might consider using a cross assembler (someone has a
name?), these are far, far, far more powerful and can be highly
integrated into VICE.
--
Christian Brandt

life is short and in most cases it ends with death
but my tombstone will carry the hiscore
rusure
2013-03-26 23:02:22 UTC
Permalink
Post by Christian Brandt
Post by Payton Byrd
VICE has a very good ML monitor.
True. Its partly even more powerful than a real machine for debugging.
You are also free to load a assembler into the ROM at $8000 which opens
up quite a lot options. Data Becker sold a pretty good assembler which I
have around somewhere as a ROM-Image. Most powerful assembler ever on
true iron. Only bad thing: It switches off the basic ROM as it occupies
$8000-$BFFF.
Though you might consider using a cross assembler (someone has a
name?), these are far, far, far more powerful and can be highly
integrated into VICE.
Christian Brandt
If you want some laughs, try writing C128 code with a C64 assembler. GOing 64 in C128 mode, loading the assembler system, writing the C128 mode, GOing 128 (oops reset the C=), finding errors in the C128 code written in C64 assembler source, then start over. This gets OLD real fast.
Payton Byrd
2013-03-28 17:11:06 UTC
Permalink
Post by rusure
If you want some laughs, try writing C128 code with a C64 assembler. GOing 64 in C128 mode, loading the assembler system, writing the C128 mode, GOing 128 (oops reset the C=), finding errors in the C128 code written in C64 assembler source, then start over. This gets OLD real fast.
You do know you can just type moN in 128 mode to get to the built in monitor, right?
rusure
2013-03-28 23:16:58 UTC
Permalink
Post by Payton Byrd
Post by rusure
If you want some laughs, try writing C128 code with a C64 assembler. GOing 64 in C128 mode, loading the assembler system, writing the C128 mode, GOing 128 (oops reset the C=), finding errors in the C128 code written in C64 assembler source, then start over. This gets OLD real fast.
You do know you can just type moN in 128 mode to get to the built in monitor, right?
There is somebody in the "SPEED=" thread who attempts to enter assembly language source code into a C64 monitor program. The monitor shoots him down in flames whenever he tries to enter a 6500 instruction that referres to a symbolic label. I can't wait for his reaction to the monitor's response when he tries to enter "END". Jim Butterfield's book makes extensive use of SUPERMON. There is an appendix for coding C128 versions of his examples in the primary part of his book. The appendix uses the hard wired C128 monitor. When debugging my C128 code, I try to use the C128 monitor when possible. There are times when code revisions MUST be entered using the assembler. Butterfield suggests a clumsy solution by filling in the value of a label with a preliminary guess. In the second stage of the coding process, the actual values of the labels would be substituted for the guesses. I read somewhere that Craig Bruce wrote some of his stuff(ZED, LITTLE RED READER, or possibly his C128 UNIX system) using only a monitor. For me, Butterfield's suggeestion would be error prone. Although my methods of C128 coding are clumsy, I prefer them to Butterfield's.
Chris Baird
2013-03-30 12:46:41 UTC
Permalink
Post by rusure
I read somewhere that Craig Bruce wrote some of his stuff(ZED, LITTLE
RED READER, or possibly his C128 UNIX system) using only a monitor.
I've written entire machine-code games and mini operating systems using
DATA statements..

Stuff like:

110 DATA 169,147,32,242,210,255
120 DATA 160,0,169,0
130 DATA 153,0,150,153,0,151
140 DATA 200,208,(count backwards from here +-256)
150 ...
Post by rusure
1983
Expecting 14 year-olds to fork out $120 for a VIC20 Machine code
cartridge
--
Chris
dott.Piergiorgio
2013-03-30 16:02:23 UTC
Permalink
Post by Chris Baird
I've written entire machine-code games and mini operating systems using
DATA statements..
110 DATA 169,147,32,242,210,255
120 DATA 160,0,169,0
130 DATA 153,0,150,153,0,151
140 DATA 200,208,(count backwards from here +-256)
150 ...
I'm conviced that the obvious tool needed today (some sort of data2hex,
data2bin, data2asm &c.) will be actually useful, but seems that there's
nowhere on the 'Net.... and lest not forget these mlx & similiar listings ;)

I think that there's too many nifty things buried in those datas and mlx
runes whose are worth to be disassembled...

Best regards from Italy,
dott. Piergiorgio
Payton Byrd
2013-03-31 04:17:26 UTC
Permalink
Post by dott.Piergiorgio
Post by Chris Baird
I've written entire machine-code games and mini operating systems using
DATA statements..
110 DATA 169,147,32,242,210,255
120 DATA 160,0,169,0
130 DATA 153,0,150,153,0,151
140 DATA 200,208,(count backwards from here +-256)
150 ...
I'm conviced that the obvious tool needed today (some sort of data2hex,
data2bin, data2asm &c.) will be actually useful, but seems that there's
nowhere on the 'Net.... and lest not forget these mlx & similiar listings ;)
I think that there's too many nifty things buried in those datas and mlx
runes whose are worth to be disassembled...
Best regards from Italy,
dott. Piergiorgio
CBM Programming Studio does this.
Chris Baird
2013-03-31 19:50:45 UTC
Permalink
Post by Payton Byrd
Post by dott.Piergiorgio
I'm conviced that the obvious tool needed today (some sort of
data2hex, data2bin, data2asm &c.) will be actually useful, but seems
that there's nowhere on the 'Net....
Unixperson to the rescue!

- save as dataify.sh ------- 8< --------
#!/bin/bash
cat $@|\
hexdump -v -e '16/1 "%u " "\n"' |\
sed -e 's/ /,/g' -e 's/,0/,/g' |\
awk 'BEGIN{l=100}{print l" DATA "$1; l++}'
-------- 8< -------- ------- 8< --------

(The sed expression "-e 's/,0/,/g'" can be removed if you like
your zeros.)

$ Bin/dataify.sh binary.bin

100 DATA 255,216,255,225,,230,69,120,105,102,,,73,73,42,
101 DATA 8,,,,5,,18,1,3,,1,,,,1,
102 DATA 0,,49,1,2,,28,,,,74,,,,50,1
103 DATA 2,,20,,,,102,,,,19,2,3,,1,
[..]

I once used a similar trick to a quick&dirty conversion of GIFs into
Apple2 programs: http://kildall.apana.org.au/~cjb/image2applesoft
(result: http://kildall.apana.org.au/~cjb/sj.applesoft)
Post by Payton Byrd
CBM Programming Studio does this.
Google Groups also double-spaces quoted text.
--
Chris
Brendan Robert
2013-03-31 22:16:27 UTC
Permalink
Post by Chris Baird
Post by dott.Piergiorgio
I'm conviced that the obvious tool needed today (some sort of
data2hex, data2bin, data2asm &c.) will be actually useful, but seems
that there's nowhere on the 'Net....
Unixperson to the rescue!
Awesome shell-fu! I wonder if it would be even more feasible to do something more like base64 and store data in 6-bit ascii format as a bunch of strings. It would be immensely slow, but it might be smaller in size if it is possible to implement a tiny decoder routine.

More info about how to implement:
http://stackoverflow.com/questions/3788707/any-base64-decoding-algorithm-in-basic

-B
dott.Piergiorgio
2013-04-01 14:01:21 UTC
Permalink
Post by Brendan Robert
Post by Chris Baird
Post by dott.Piergiorgio
I'm conviced that the obvious tool needed today (some sort of
data2hex, data2bin, data2asm &c.) will be actually useful, but seems
that there's nowhere on the 'Net....
Unixperson to the rescue!
Awesome shell-fu! I wonder if it would be even more feasible to do something more like base64 and store data in 6-bit ascii format as a bunch of strings. It would be immensely slow, but it might be smaller in size if it is possible to implement a tiny decoder routine.
http://stackoverflow.com/questions/3788707/any-base64-decoding-algorithm-in-basic
an CBM basic uudecode/encode program can also be a nice benchmark for
basic compilers.....

Anyway, Byrd's script is good for the opposite work I tried to describe:
converting the DATA lines into binary/hex dump, having in mind the
disassembling the LM routines &c. with x-disassemblers... I still
haven't tried it (In Italy boxing day is mainly dealing (and indeed,
also boxing...) with enlarged family...) but looks interesting ;)

Best regards from Italy,
dott. Piergiorgio.
rusure
2013-03-30 23:29:48 UTC
Permalink
Post by Chris Baird
Post by rusure
I read somewhere that Craig Bruce wrote some of his stuff(ZED, LITTLE
RED READER, or possibly his C128 UNIX system) using only a monitor.
I've written entire machine-code games and mini operating systems using
DATA statements..
110 DATA 169,147,32,242,210,255
120 DATA 160,0,169,0
130 DATA 153,0,150,153,0,151
140 DATA 200,208,(count backwards from here +-256)
150 ...
Chris
You must be able to convert hex to decimal and back again in your head. You must have the ML numerical instruction set memorized as well.

Me, I need all 10 fingers, toes and some electronics for numerical base conversion. I need all the coding help I can get. I even need something like a symbolic reference mapper for my code. I've only seen that in the MADS assembler. Jim Butterfield wrote one for BASIC and the old CDC main frame had one for FORTRAN.
Kalevi Kolttonen
2022-10-20 14:33:51 UTC
Permalink
Post by rusure
I don't have a Commodore emulator, I'm stuck with a real C128D
or SX64. Do any C= emulators include assemblers in their systems?
I am a pretty lousy assembler programmer, but in this day and age
I would avoid real Commodore hardware and definitely use a
modern cross-assembler running on Linux, *BSD, Mac or even
Windows. That way you can use powerful text editors like vim
or emacs to write your code.

Then for debugging VICE's Machine Language monitor is a great tool.

Best regards,
Kalevi Kolttonen
Daniel PATH
2022-10-22 01:01:00 UTC
Permalink
//Hello Kalevi,//

on *10/20/2022* at *14:33:51* You wrote in area *CBM*
to *rusure* about *"Re: assemblers in emulators?"*.
Post by rusure
I don't have a Commodore emulator, I'm stuck with a real C128D
or SX64. Do any C= emulators include assemblers in their systems?
KK> I am a pretty lousy assembler programmer, but in this day and age I would
KK> avoid real Commodore hardware and definitely use a modern cross-assembler
KK> running on Linux, *BSD, Mac or even Windows. That way you can use
KK> powerful text editors like vim or emacs to write your code.

KK> Then for debugging VICE's Machine Language monitor is a great tool.

you can use vi on your fav. commodore machine as well ;)

https://vi65.sourceforge.net/

Regards,
Daniel PATH
phigan
2022-10-29 04:10:09 UTC
Permalink
Post by Daniel PATH
you can use vi on your fav. commodore machine as well ;)
https://vi65.sourceforge.net/
Can you? The download links are broken..
Oh, nevermind, it's on https://sf.net/projects/vi65/files/binaries/
in case anyone else is lazy too.

Then again, I'm on a C64 right now and typing in vi... except on a
remote machine via StrikeTerm2014.

Loading...