Programming in Assembly with VICMON on the VIC-20

  Рет қаралды 4,440

TechTinkering

TechTinkering

Күн бұрын

Creating a simple music player using the machine language monitor on the VIC-20.
techtinkering.com/articles/pr...
00:00 Introduction
00:51 Designing a simple music player
02:13 Starting VICMON
03:19 Entering the program
06:49 Correcting forward references
07:50 Saving/Loading the program
09:05 Running the program
09:29 Expanding the program to display the name of the tune
17:23 Stepping through the code
18:28 Setting a breakpoint
21:52 Running the program from BASIC
22:59 Summary

Пікірлер: 17
@Brfff
@Brfff 3 ай бұрын
I'm not sure what is more satisfying ... the simple-to-follow & very informative tutorial or the satisfying clack of the keyboard ... 😌
@Paul-xs7ks
@Paul-xs7ks 7 ай бұрын
Thank you, this is really helpful. I have resurrected my childhood Vic20 and this is a great shortcut to writing and running new programs. Your pace and explanations are great to accelerate my explanation of getting back into the Vic20. Well done.
@denoydeboer
@denoydeboer 10 ай бұрын
Awesome to see others coding on the Vic-20 in this day and age. I discovered some of my Vic-20 program code printouts from 1983 or so and will be finishing up those games and releasing them soon.
@Ensign_Cthulhu
@Ensign_Cthulhu 6 ай бұрын
Just taking my first steps into Commodore assembly, and this was very useful, particularly the use of the M command for entering the data table and managing the forward references. I have one of these newfangled THEC64 things, so I have disk drive emulation and can "afford" to run the multi-part assembler programs, but it feels like a pain in the behind to use when starting out writing small programs to get the hang of things. Hand assembly with manual entry into the monitor is currently still the best option for me.
@mathom31
@mathom31 3 жыл бұрын
Excellent video. I have a feeling I'll be referring to this and the article quite often.
@PeranMe
@PeranMe 2 жыл бұрын
Superb stuff, thank you!
@gyozopajter535
@gyozopajter535 3 жыл бұрын
Again a very good video, thank you very much!
@TuxedoPanther
@TuxedoPanther 3 жыл бұрын
Brilliant, many thanks for sharing 😀👍
@waltchaa
@waltchaa 3 жыл бұрын
Thank you for the great video. I'm looking forward to trying it on my VIC
@monkey_see_monkey_do
@monkey_see_monkey_do 2 жыл бұрын
This was extremely helpful, thank you so much!
@bloodmapedit
@bloodmapedit 2 жыл бұрын
I've made something similar but with a considerable reduction in sequence data by storing only the notes that are going to be played and a song with a maximum of 15 unique notes. I used 2 tables, one for frequency values and another with index nybbles, so 1 byte can hold 2 notes. These nybble values are the indexes for the freq. table :)
@TechTinkering
@TechTinkering 2 жыл бұрын
Nice work. I love these sorts of compression techniques and it's one of the reasons that I like the VIC-20 so much because it's small memory encourages them so much.
@throwitatthewall6289
@throwitatthewall6289 2 жыл бұрын
Hi, thanks for the video. I have a basic question that probably applies to more than just the vic20 but are sometimes the memory addresses incremented by different amounts? I mean, sometimes they go from like 1130 to 1131 and then from 1135 to 113A. These are just examples. I was just wondering why that is because I’m just thinking it might be important to know what addresses are there and what aren’t. Hopefully that makes sense. I’ve never programmed asm before so this mostly new to me. Everything dealing with memory is done for me for the most part
@throwitatthewall6289
@throwitatthewall6289 2 жыл бұрын
I think i know why now. Maybe? It’s because the code beforehand is using the bytes from the memory in those spaces. Hence why each line of music code increases the address by 5. Am I half-educatedly guessing correctly?
@TechTinkering
@TechTinkering 2 жыл бұрын
@@throwitatthewall6289 Yes, you're right. When I enter the music using the 'M' command it enters 5 bytes per line and hence increases the memory address by 5 each time. When entering assembly language you will find that different instructions take up a varying number of bytes and hence the next address increment will vary based on this.
@csbruce
@csbruce 3 жыл бұрын
0:51 This seems like an odd strategy: write the code out in assembler and then enter it into a monitor. Also, the paper version will invariably have undetected bugs. 3:37 You could put a BASIC launcher up front to make the program easier to RUN and start the code at $100F. 5:20 Do you actually have to type in the "$"? Are all values hexadecimal by default? 5:55 It's interesting that the code uses the Jiffy timer instead of software loops. This makes it more portable to systems at different clock speeds, such as with emulators. 5:59 Technically, you could LDA $1103,X : CMP $A2 and then BNE back to the CMP instruction since the delay value is a constant. This would make your program respond to the condition change two clock cycles faster! 10:28 With a monitor, it's a lot more practical to always add the new functionality to the end of the program and patch the existing code to call the new code. Relocating code is very tricky to do right and will frequently result in bugs.
@TechTinkering
@TechTinkering 3 жыл бұрын
Different things work for different people. I always found that ensuring I had a copy of the code on paper worked for me. I kept it in sync with my working code and I don't see any reason that there would be more undetected bugs using this approach (assuming I kept the paper copy in sync accurately) than just inputting straight into the monitor as I would test each routine thoroughly before moving on. I certainly found it much easier to plan a routine and locate bugs though if I had a copy on paper using symbolic references. One odd feature of VICMON is that you have to use the '$' in assembly instructions even though all values are in hex, it is something that bugs me a little. I could have written the code differently but as I mentioned it was never supposed to be an example of a good music player as it was only there to demonstrate the monitor. On the last point I guess I just always did it that way and got accustomed to it - it probably helped having an accurate paper copy marked up with the forward addresses and other addresses of interest. I'll try this approach in future as see how I find it. Thanks :-)
Storing Machine Code in REM Statements on the VIC-20
5:50
TechTinkering
Рет қаралды 749
Jim Butterfield's Machine Language for the Commodore 64, 128.. Revised
38:34
8-Bit Show And Tell
Рет қаралды 20 М.
DAD LEFT HIS OLD SOCKS ON THE COUCH…😱😂
00:24
JULI_PROETO
Рет қаралды 16 МЛН
БИМ БАМ БУМ💥
00:14
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 3,1 МЛН
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 18 МЛН
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 6 МЛН
40 Columns in Basic on the Commodore VIC-20
18:27
TechTinkering
Рет қаралды 10 М.
The 20 Greatest Commodore VIC-20 Games of All-Time
17:21
The Laird's Lair
Рет қаралды 14 М.
Learn FORTH on the VIC-20
39:09
My Developer Thoughts
Рет қаралды 3,2 М.
The VIC-10 & VIC-30: Commodore UK's Cancelled Computers
19:42
8-Bit Show And Tell
Рет қаралды 43 М.
Water powered timers hidden in public restrooms
13:12
Steve Mould
Рет қаралды 348 М.
27c3: Reverse Engineering the MOS 6502 CPU (en)
51:57
Christiaan008
Рет қаралды 434 М.
VIC-20 Penultimate+2: Programming, Games, Utilities, RAM Expansion and More
1:04:47
Writing Commodore 64 Assembly Language....using only BASIC.
10:08
My Developer Thoughts
Рет қаралды 6 М.
Commodore VIC-20 Games Round Up 2023
8:43
RetroGamerNation
Рет қаралды 3,4 М.
VIC-20 Super Expander and EPROM programmer
11:39
The 8-Bit Guy
Рет қаралды 506 М.
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 6 МЛН
iPhone socket cleaning #Fixit
0:30
Tamar DB (mt)
Рет қаралды 17 МЛН
Tag him😳💕 #miniphone #iphone #samsung #smartphone #fy
0:11
Pockify™
Рет қаралды 2,2 МЛН