Assembler

You need an actual VIC.

Moderator: Moderators

User avatar
pixel
Vic 20 Scientist
Posts: 1357
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: Assembler

Post by pixel »

I would start down at the metal. What's a transistor/gate. What does an adder look like. What's an ALU, data bus, address bus, control bus. Now that bits and bytes make sense, then I'd continue with assembly.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
Orangeman96
Vic 20 Amateur
Posts: 45
Joined: Tue Jan 16, 2024 3:42 pm
Location: U.S.A.

Re: Assembler

Post by Orangeman96 »

Thanks, all! I understand hardware pretty well (I used to work on government range systems), so I am focusing there to go "low-to-high" in a manner of speaking. :) -OGM
Last edited by Orangeman96 on Fri Mar 29, 2024 7:21 pm, edited 1 time in total.
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Assembler

Post by Mike »

In this thread here, another recent thread about "Recommendations for VIC-20 assembly tutorial[s], tools" already had been mentioned.

In that other thread you will find the link to my VICMON primer. That one specifically aims to make the bridge between a high level language (here, BASIC) and machine language, which is exactly what you are asking for.

Equip yourself with any of the available reference books of the 6502 instruction set and try out the examples in the thread. They contain a good lot of standard idioms and that should give you an idea what machine language is about.

Monitors give you a direct access to machine language quite akin to the interactive use of BASIC. Once you have grasped the basics there, the transition to symbolic assemblers to build bigger programs is natural and welcome.
Merytsetesh
Vic 20 Amateur
Posts: 40
Joined: Sat Mar 02, 2024 8:57 pm
Location: Canada

Re: Assembler

Post by Merytsetesh »

I have been trying to use wAx2 with VICE and I cannot get the dratted thing to settle into memory. I found a link to a GitHub repo with .PRG and .CRT files and the wAx2 manual, but no amount of persuading seems to get VICE to be willing to install it as a cartridge.

I am sure, as usual, I am missing something elementary here. As usual :-D
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Assembler

Post by beamrider »

Out of interest and as something I've never really used. What's the benefits of using a monitor rather than just going straight to an assembler and using the VICE monitor.
User avatar
pixel
Vic 20 Scientist
Posts: 1357
Joined: Fri Feb 28, 2014 3:56 am
Website: http://hugbox.org/
Location: Berlin, Germany
Occupation: Pan–galactic shaman

Re: Assembler

Post by pixel »

beamrider wrote: Thu Mar 28, 2024 2:41 am Out of interest and as something I've never really used. What's the benefits of using a monitor rather than just going straight to an assembler and using the VICE monitor.
It makes you a tough boy by over-complicating about everything? Something remotely ca65 compatible I'd find interesting.
A man without talent or ambition is most easily pleased. Others set his path and he is content.
https://github.com/SvenMichaelKlose
User avatar
huffelduff
Vic 20 Hobbyist
Posts: 118
Joined: Sat Sep 05, 2020 9:14 am

Re: Assembler

Post by huffelduff »

Hi all,

Everyone has been giving quite good recommendations, so I guess I would suggest someone who is interested in assembler try all of them and then they have to figure out which one works for them.

For myself here's my suggestion for starting off with assembler on the 6502:

Book - 1985 Assembly language for kids (Commodore 64) - by William B. Sanders

My setup for coding:
KickAss (kick assembler - works using Java so it should run on anything that supports it)
I use Kickass because I like the Relaunch 64 IDE.
Warning: The Kick assembler is more C like in its commenting/instruction separation and it allows for instructions to be written next to each other. So its not standard (Please take note).

Anyway greetings all

H

P.S. Below are some REAL exotic books for the computer enthusiast:
Book #1.png
Yeah Webassembly exists but this is for the masochist who wants to attempt it in X64
Book #2.jpg
Book #3.png
Book #4.png
User avatar
Orangeman96
Vic 20 Amateur
Posts: 45
Joined: Tue Jan 16, 2024 3:42 pm
Location: U.S.A.

Re: Assembler

Post by Orangeman96 »

Happy "almost-end-of-March" out there! :D

I am over halfway through Bruce Smith's VIC 20 Machine Code and feel like I have read an expanded version of Chapter 3 in my VIC-20 Programmer's Reference Guide, which has been beneficial, but certainly not of the magnitude I was hoping for. (Note: I still learn best by reading from "dead tree" media.)

Once I have ruminated enough on VIC 20 Machine Code, I will contemplate what to read next based upon the excellent input I have received from you all, which I am most grateful for, noting that I may opt for the legendary Jim Butterfield's Machine Language on the Commodore 64, 128, and other Commodore Computers - Revised and Expanded Edition. (Please do correct me, however, to 100-percent if there is something better to read beforehand. :) )

OGM
Last edited by Orangeman96 on Sat Mar 30, 2024 10:14 pm, edited 1 time in total.
Merytsetesh
Vic 20 Amateur
Posts: 40
Joined: Sat Mar 02, 2024 8:57 pm
Location: Canada

Re: Assembler

Post by Merytsetesh »

Finally got wAx2 working last night. For some reason the .crt file I downloaded from GitHub was corrupted, which is why it wouldn't settle into VICE. (I've also experienced a similar problem with the manual PDF.) I ended up downloading the .eep and using cartconv to get it to work. And now...

... and now...?

... I have no words. I'm beyond impressed, beyond blown away, beyond happy. It's the thing I've always wanted for the VIC20, the thing I envied BBC Micro owners for: a built-in, fully-featured assembler. It's incredible. I can't express my delight, or my thanks to chysn, deeply enough.

Gosh. :-)
Post Reply