Тёмный

Commodore 64 Assembly Language Programming With Turbo Macro Pro 

8-Bit Show And Tell
Подписаться 56 тыс.
Просмотров 54 тыс.
50% 1

Наука

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 241   
@thosewerethegames8269
@thosewerethegames8269 2 года назад
Finally, (after 40 years) someone who can explain assembly in an understandable way! Subscribed!
@BillAnt
@BillAnt Год назад
Yep, with those magical talking hands. :)
@dionjennings2379
@dionjennings2379 Год назад
If only I'd had access to this in 1984!!
@bob-ny6kn
@bob-ny6kn 5 лет назад
Thank you for keeping the C64 family alive. I taught myself machine/assembler on the 6502 (Apple][e first, then C64) when our school only had one computer. Your exact program (change border color) is the very first machine language program I wrote on the C64 in 1983. Notice the colors on the border, and how they form a short "line." Something in your system is taking up a lot of CPU time because after seeing this same output, I hand "poke"d my machine code. When that hand-poked code ran, the colors were indiscernible dots of color, screaming fast, like "bug races" of old televisions not tuned to a good frequency. After seeing the difference (interpreted/interrupted code versus free-running), I made a crude "ASSTOHEX" disassembler (a bunch of if-then lines) so I could write using a text editor (that I hand-poked into a program) in "Assembler language" then have that text interpreted, assembler to hex, then poked into memory. I wrote nothing of value, but just entertained myself with widgets only useful to myself. I wish I stayed with low-level programming, but I let myself get distracted by booze and women, then picked up Pascal/C and HTML/CSS/Javascript. I also installed my own "reset" button by running the C64's "reset" pin to ground through a SPST/pushbutton (worked perfectly, no need to power off/on). I also added a SPDT/toggle switch to the speaker because when my 300 baud MODEM was connected (after the screaming handshake), a local radio station played through the always-on, C64 speaker (KFAB… so you know where I was at that time). Gosh, that was a tinker-ers dream with the user ports. It was SO FAR ahead of its time - now people buy Arduino and other PIC programming tools. C64 had those all the time, easily accessible and addressable… but sadly Bill Gates called it a toy, stating that personal computers were for business use only and not to be played with... and all his sheep did the same. I put my C64, 1541, cassette, TV and game/tv modulator on a roadside one day when I had to move for work. Ah, my first love. Goodbye, forever. Again, thank you. This was a fun video. I am now a subscriber.
@ChrisHorneVL
@ChrisHorneVL 2 года назад
Ironic considering that Javascript leads to booze.. (not women though) .. Either way.. booze is always the constant. haha. Very cool on your disassembler!
@chrisfuller1268
@chrisfuller1268 2 года назад
Cool! I also wrote a bunch of assembly in the 1980s for the C64. Good times
@Jdvc-yd5tx
@Jdvc-yd5tx 2 месяца назад
The Wiz - Ease On Down The Road. "Oh there may be times when you wish you wasn't born" the story of my LIFE. 😊 ⚛
@Jdvc-yd5tx
@Jdvc-yd5tx 2 месяца назад
Mo. 🧙‍♀️
@taddy666
@taddy666 Год назад
Thanks so much. Just returning to all this after 40 years. Didn't have an assembler back then and didn't really know what I was doing! This channel is awesome
@mekkler
@mekkler Год назад
I programmed assembly code on the C64 with the Machine Language Monitor cartridge in the cartridge slot.
@bierundkippen720
@bierundkippen720 2 года назад
As I already wrote in the comments of another video: SYS 2^15 is easier to remember than SYS 8*4096.
@TheUtuber999
@TheUtuber999 Год назад
I would have thought SYS 32*1024 would be easier to remember than SYS 8*4096... but honestly, if one doesn't think in powers of two, none of these memory ticklers will likely be of any help. 😄
@86Carrera911
@86Carrera911 4 года назад
Thanks Robin! I wish that I had taken the time to dive into this stuff when I had my C64 back at age 15. Oh well, better late than never after 35 years! Looking forward to digging into some assembly language on the 6510. At my first job out of university, I was writing assembly for the 8051, so a little different, but not too bad. Maybe if I keep going, I'll actually break down and reacquire some real hardware. I stupidly let my wife talk me into getting rid of it 10 years ago... :(
@jasperblues1231
@jasperblues1231 4 года назад
Thanks so much - takes me back. C64 and the AppleII were the machines that I learned to program on, in BASIC and Assembly, somewhere between the ages of 9 and 14. I was getting rusty on some fundamentals, so decided to stop by. The C64 is long gone, but I'll try it out on VICE.
@tnd64
@tnd64 3 года назад
I like to occasionally have a dig into the original C64 assemblers. When I first had theC64 full size in 2019, I set myself a coding challenge. There were no freezer cartridges available at the time. All I could rely on was Turbo Assembler, Code Sucker Monitor and a few PD utilities for designing graphics and making music. I had to rely on save states in order to save the progress of my project, just in case something went wrong and I had a fatal crash. 2020 I managed to make a snake style game on theC64 ;)
@larswadefalk6423
@larswadefalk6423 2 года назад
Good work there!
@royalestel
@royalestel Год назад
Wow! Great job!
@comatose3788
@comatose3788 2 года назад
I started programming on an Amiga with Devpack 6800 assembler. I remember printing out programs that were as long as the street block then marking sections out with highlight markers. All that just to be able to fully focus on what I was doing.
@zledwon
@zledwon 5 месяцев назад
This video is a masterpiece of clear, detailed knowledge transfer. Thank you! I've been a subscriber for a long time,. Now I finally have some time to dig out C64, recall assembler and write some code for fun
@8_Bit
@8_Bit 5 лет назад
Bug Report: The 6510 stack is a LIFO queue: Last In, First Out. Thanks to Christian Knechtel for the correction. Feel free to ask questions in the comments, and if I forgot to mention anything, tell me here so I can get it into the next episode.
@christianknechtel8683
@christianknechtel8683 5 лет назад
Nice video again.Just one nitpick: I think the stack works in LAST IN/FIRST OUT mode.But correct me if I´m wrong.
@8_Bit
@8_Bit 5 лет назад
@@christianknechtel8683 You're correct, I don't know how I missed that during the editing. Thanks!
@manicsorceress2181
@manicsorceress2181 5 лет назад
It's good that you use small, easy to understand Assembler programs that even a BASIC guy like me can understand. You explain everything very well.
@TheTRONProgram
@TheTRONProgram Год назад
Excellent overview! I liked the snapshot cartridge and the ability to restart the Turbo Assembler while running the program with sys 4096*8 after runstop restore.
@chrisfuller1268
@chrisfuller1268 2 года назад
I wrote a large number of assembly language utilities for the C64 which makes it easy for BASIC programs to access the graphics and other capabilities of the C64. I'd love to share these utilities.
@StrangelyIronic
@StrangelyIronic 2 года назад
I learned Assembly, Pascal, and C as a kid on my not quite yet vintage but still pretty old Apple IIGS and Macintosh iici machines I got as gifts in 97 and then 98 for my 5th and 6th birthdays. They were both from my uncle's workplace in storage. When they were in use, they were loaded up with some of the best expansion cards and accelerators you could get at the time. I still have both computers set up and write programs on both, but the IIGS is probably a bit more fun to write programs to create pixel art/music tracks on. System 7 is great on the buffed-up Mac iici for sure, but the IIGS has a certain charm to it. When I was in college, I was sad that they barely talked about Assembly in classes. When they did, they used kind of vague explanations to cover Operators instead of comparing them to things students would already have some understanding of. I was annoyed they only really taught C++, I'm not a fan of it personally with the relative instability (number of changes made often to "solve" problems, not program instability) compared to C. That and how insanely abstract and overcomplicated OOP has gotten to.
@10MARC
@10MARC 5 лет назад
Robin, how can we be sure you are not just a pair of disembodied hands like Thing from "The Addams Family"? That's all we ever see of you!
@8_Bit
@8_Bit 5 лет назад
You've found me out! Though I did appear in corporeal form at the end of "The Extra Spaces in C64 BASIC Errors" episode :)
@10MARC
@10MARC 5 лет назад
@@8_Bit I think it was a stunt double...
@phil2768
@phil2768 Год назад
Thanks again for a fantastic video and for lifting the veil by explaining not just what code to write but how it works by disassembling. It really helped me to understand what was going on.
@fubaralakbar6800
@fubaralakbar6800 2 года назад
I just did the border-flash thing purely by using PEEK and POKE (and SYS). No Turbo Macro Pro required. That was a freaking insane feeling :D
@Breakfast_of_Champions
@Breakfast_of_Champions 5 лет назад
When I learned this stuff long ago I found it enormously helpful to break down the bit manipulation at topics like two's complement and visualize binary in a similar way as visualizing Lego studs 🙂
@chomo54andbabyaisha97
@chomo54andbabyaisha97 3 года назад
I didn't have anything back then, not even a hex monitor, because I didn't know what it was. So I learned by trying, which also means I had to learn the decimal value for the opcodes in my head and then write them directly in data lines. But today, what I would have done was to first learn how a computer functions from the inside of the computer, because it is of great help. And there are many channels, but I would definitely recommend Ben Eater's channel. He basically builds a computer from scratch and explains each and everything about how it works. I would watch that - and eventually try it out too - before I started machine code programming. But you definitely can learn machine code without, I will though like this channel recommend the Commodore 64 Reference Guide. Without that, you get nowhere.
@dinaari-vgm
@dinaari-vgm 9 месяцев назад
thanks for the video. im starting to love programming retro computers as a recovering javascript developer
@sandcat-maurice
@sandcat-maurice Год назад
Extremely useful! I downloaded Turbo Macro Pro, installed on my MEGA65 (with C64 core) and followed your instructions step by step. My first baby steps in ML!! And yes, I also bought a (second hand) copy of the Programmers Reference Guide two months ago 😃 ps, Is the exact same little program also supposed to work when a REU is connected or are additional instructions required? With REU enabled (we have that option in the MEGA65), 'TMP+REU' recognise the added 512k, but when executing the program I cannot start TMP with the SYS command, it seems to hang. Update: never mind, you explained the use of the REU in the next episode. Return with SYS 320. Thank you!!
@sparkyKestrel
@sparkyKestrel Год назад
@ 2:42 what is an ommodore 64/128?
@sheldonkerr
@sheldonkerr 5 лет назад
Outstanding. Thanks very much for the terrific detail in this video. Love your work!
@myorke99
@myorke99 2 года назад
great intro to asm on a c64! simple instructions, obvious visual results. more please!
@andira2010
@andira2010 4 года назад
Hi Robin, a very nice tutorial about assembler programming on good old Commodore 64. Thumbs up for that series! 👍🏻 I didn't know TMP yet. I always coded in Final Cartridge III Monitor and today I use Relaunch with KickAssembler and ACME on my MacBook. Unfortunately the link with all the programming books in your video description doesn't work anymore... I just subscribed to your Channel here! Thank you for your videos 😀 Greetings from Germany, Andira
@75slaine
@75slaine 5 лет назад
Loving it Robin. Can’t wait for the lesson
@byteforever7829
@byteforever7829 2 года назад
awesome, and I followed along at home on the C64 breadbin :)
@stupossibleify
@stupossibleify 5 лет назад
Another excellent video, Robin!
@bald_engineer
@bald_engineer 3 года назад
FYI Robin, I've been watching your videos for a while. I have been reading various books on 6502 programming. Some on the Apple II and some on the C64. The other day I was working on a RS-232 BASIC program and found converting from HEX to DEC a pain. After doing a quick google search, I came across a video of yours I watched in the past. That got my assembly bug going (get it?) and so I fired up TMP. I've been using your assembly/programming videos to glean bits and pieces. Long way to say, I very much appreciate these kinds of videos! Okay, now I'm going to go watch the joystick-controlled sprites video!
@jim_64s8-bitprojects5
@jim_64s8-bitprojects5 5 лет назад
This is great. I love seeing how this is/was done before cross assembly on PCs!
@williamtell1477
@williamtell1477 Год назад
this guy just has a copy of Autoduel sitting under the Amiga. love it!!
@tiger1x
@tiger1x 3 года назад
Are there any known issues with TMP and VICE emulator? In my case I can compile a program only once but after that the folowing changes in the assembler code has no effect! It's always the first version of the code even if it's compiling and showing no error. It happens only on the vice emulator...
@mrysSOFTWARE
@mrysSOFTWARE 5 лет назад
Thanks a lot for sharing this!!! Many memories comes back!!! 😀👍 Result of this: Buying a C64 on eBay and brings memories back to life!!! 😂
@nightcoder5k
@nightcoder5k 4 года назад
This video brings back my memory. I still have the 6502 assembly book, but I think mine is brown.
@psionl0
@psionl0 5 лет назад
Memories! I originally keyed in an assembler program from a book (I think it came from Compute! magazine). I didn't need an editor because it used the basic screen editor (line numbers and all) so you could enter an assembly language program the same way you would enter a basic program. It was quite a good assembler which revolutionized my C64 use. Later, I wrote a FORTH for my C64 which included a "label less" assembler (it turned out to be remarkably easy to do). Structured programming in assembly language is a quantum leap forward. In the FORTH assembler, your code would be like this: BEGIN, $D020 INC, $D021 DEC, AGAIN,
@johnsobota6234
@johnsobota6234 9 месяцев назад
Seems to me that TMP could also be used to assemble C128 programs- you’d just have to save the object code to disk and bload it later when you’re booted in c128 mode. If this is possible, it might make an interesting video, Robin.
@randomscribblings
@randomscribblings 5 лет назад
You know what I was just noticing? That the emulation of VICE is so real, it's getting the keyboard keys you can't press together right ---- so that I'm getting lst rather than list and whatnot. That's true emulation.
@carnright
@carnright 4 года назад
Great vid on the assembler 🙂sadly bombjack link no longer works but archive .org has lots of commodore books. Finally your hand acting reminds me of “This Old Tony” channel 😁
@8_Bit
@8_Bit 4 года назад
Thanks, I updated the bombjack link to this new one: commodore.bombjack.org/commodore/index.htm
@ChristopherNelson2k
@ChristopherNelson2k 5 лет назад
Awesome, followed along and can't wait for the next episode!
@jasonmartin5488
@jasonmartin5488 4 года назад
Really like this, please keep it up as i'm following very closely - THANKS
@dionjennings2379
@dionjennings2379 Год назад
Hi Robin, I wish to thank you for your videos and tutorials on the C64 and specifically, assembly programming. Through your own tutorials I have switched assemblers (I was using Compute Gazette's Fast Assembler by Yves Han) and now find TMP to be well suited to help me get back to my coding days! So thank you for that! I have been looking over the documentation for TMP and understand it for the most part. However I have a question. I have a program already entered and saved and I wish to start a new program. Is there a "new" command? How do I start with a new screen, or a blank TMP screen to start a new program? Thanks in advance!
@8_Bit
@8_Bit Год назад
I believe back arrow C will trigger a "cold start" prompt, then answer "Y". If it doesn't work I'll dig into it more, let me know.
@dionjennings2379
@dionjennings2379 Год назад
Yes, that did it. Many thanks!!@@8_Bit
@3vi1J
@3vi1J Год назад
Hey Robin! Quick Question: In VICE (tested using x64 on Linux), using sys32768 re-enters the plain old TMP prg fine after stopping code execution with run-stop/restore just like @20:04 in your vid. However, I notice that if I have VICE set to emulate the REU, and I use the TMP+REU version, then sys32768 will not re-enter TMP after I kill code execution with run-stop/restore. Is that a VICE problem, or did I skip over something important related to REU use in the TMP docs? It's almost as if the program exist with the REU on the wrong bank or something?
@8_Bit
@8_Bit Год назад
With the REU version you use SYS 320 or maybe SYS 384 to return to TMP. Look for "jumpback" in the docs and it should explain it.
@3vi1J
@3vi1J Год назад
@@8_Bit SYS320 works! Thanks for the quick reply. I see where they mention $140 is the default jumpback now. Doh!
@carraror
@carraror 2 года назад
Hello, I know this video is some years old, but I was wondering how to avoid automatic scrolling when I output source list with command-4 and then *. I can stop it if I press run/stop but I have to be very quick.
@boyfinn6751
@boyfinn6751 4 года назад
Do you have any alternative to TMP that i could get on a tape? And how about programs assembled with TMP? Can those be saved to tape aswell?
@PlatinumDragonProductions999
17:54 I was lucky enough to have that book as a teen! :-D
@carnright
@carnright 4 года назад
Loved this! More please!
@rickthatch3556
@rickthatch3556 Год назад
one other question: when you make up routines, do you have a standard way to pass parameters? registers, parameter block or low memory blocks...?
@8_Bit
@8_Bit Год назад
I use registers whenever it's practical, otherwise a block of RAM right before or after the subroutine code if they're basically "local" to that routine. Otherwise if they're more "global" variables or parameters, then they're just defined in the main block often in zero page. So, it can be all 3 :)
@bwack
@bwack 5 лет назад
Loved it! I wonder how they manage to escape an infinite loop. The restore key must be hooked up to the interrupt and there must be some interrupt vector pointing to basic?
@8_Bit
@8_Bit 5 лет назад
Yes, I'll put it in my notes to mention that next episode. Rather bizarrely, the restore key is directly wired into the Non-Maskable Interrupt pin on the processor! So hitting the restore key causes that interrupt, which jmps through a vector at $0318 which checks for the STOP key being held down, and then runs an init routine.
@10travan
@10travan 2 года назад
Can you elaborate on using "zoom floppy" to place the program on the disc? Meaning what it's specifically. Thanks in advance C=
@8_Bit
@8_Bit 2 года назад
Zoom Floppy is a USB interface for Commodore disk drives like the 1541. It allows you to hook the 1541 or other IEC drive up to a modern computer with USB.
@drphilxr
@drphilxr Год назад
Yeah I keep coming back to this- as radiologist work hours don't lend to learning anymore, and noticed my C64 REU moves the assembler into its swap space, so SYS 32768 wont relaunch the prg. I know you cover this later- but what was the sys hex/dec address for REU's...?
@drphilxr
@drphilxr Год назад
SYS320 in the stack. its on your next one. thanks!
@3vi1J
@3vi1J Год назад
@@drphilxr AH! Thank you for posting this. I just today felt like playing with TMP and ran into the same problem and posted the same question!
@carnright
@carnright 3 года назад
YAY! my super snapshot v4 arrived now I can follow along :-)
@TheUtuber999
@TheUtuber999 Год назад
Hey Robin, I was wondering if you might know how to change the default color scheme within Turbo Macro Pro? I checked the documentation which refers to a preferences submenu that is accessible by pressing "p" after command (left arrow)... but this key seems to have no effect. Thanks in advance if you have any tips!
@8_Bit
@8_Bit Год назад
I don't use it myself, but I think the preferences submenu got moved into a separate program that's included on the full distribution disk of TMP available on style64 dot org. Looks like the program is called TMPPREFS and you should find it on the d64 you can download from their site, if you don't already have the full disk.
@TheUtuber999
@TheUtuber999 Год назад
@@8_Bit TMPPREFS did the trick. Thanks very much!
@harjitkaur7444
@harjitkaur7444 3 года назад
CHANGES THE COLOUR'S OF MAIN SCREEN.
@PhilWaller
@PhilWaller 3 года назад
Hi Robin, thanks very much for these tutorials :-). For those following along with a "thec64" can you recommend a machine monitor program as we don't have access to a cartridge slot (or do we?)
@8_Bit
@8_Bit 3 года назад
You're welcome! :) TheC64 can attach virtual cartridges in the form of .crt files. There's an archive of various versions of Super Snapshot on this page for example: rr.pokefinder.org/wiki/Super_Snapshot
@MrGoatflakes
@MrGoatflakes 5 лет назад
Again for VICE users, is by default mapped to the key, and is mapped to . Although the regular Page Up key and Escape wouldn't work for me to break out of the program, but if I put to off and pressed on the keypad, it broke out to BASIC (tested with the x128.exe on Windows 7 and doing GO64 to get into C64 mode).
@CanberraUser
@CanberraUser Год назад
I find that F12 works as the key when using VICE for Mac
@3vi1J
@3vi1J Год назад
Hmmm... Esc + PgUp works fine for me on Linux. I use that combo because I have F12 mapped to yakuake (dropdown terminal).
@harjitkaur7444
@harjitkaur7444 3 года назад
MODES ADUSTING MODE ON THE TOP
@zeus074
@zeus074 4 года назад
Great video!. Many years ago I made a programs with the assembler, there was a way to run the code and get the prompt on the basic. I don't remember how I did it, could you give an example on a next video? Thanks
@manjsc
@manjsc 2 года назад
Fantastic! Thank you
@berndeckenfels
@berndeckenfels 2 года назад
BTW with variables in basic beeing faster than parsing literals, how does it actually map variable names to the values that fast?
@cloerenjackson3699
@cloerenjackson3699 5 лет назад
Your stuff is great. Well done.
@phononify
@phononify 3 года назад
I really like your videos quite a lot ... i use "The C64" to teach my son programming ... what I would really like to figure out would be two points (i think that could be also interesting in your videos). A) How to use turbo macro pro together with a basic source ... how to combine and memory manage both, save both etc B) How to use character and sprite editors combined with tmp and memory manage this ... how to save the sprite data, load them in tmp etc ... which sprite, character editors are recommended. Would be such a gift for me and my ten year old son Simon ... cheers and greetings from Zurich, Stephan
@agostongogl3529
@agostongogl3529 Год назад
I have downloaded a few D64 floppy disk image files from this bombjack guy's site. None of them seems working in VICE. No preview either. How can it be? Am I a n00b or are these really empty image files?
@8_Bit
@8_Bit Год назад
If you attach the .d64 file in VICE (File->Attach Disk Image in the menus) then the command LOAD"$",8 should load the disk directory and the command LIST will display the files on the disk.
@agostongogl3529
@agostongogl3529 Год назад
@@8_Bit Yes, when I'm about to attach any of these .d64 files in VICE to any of my floppy drives (#8-#11), it says "CANNOT READ IMAGE CONTENT" on the right side of my screen, in the "preview" section. (When I do this with my other .d64 files, the preview of the image file's content is visible in this area.) If I attach the .d64 and type LOAD"$",8 it says: SEARCHING FOR $ ?FILE NOT FOUND ERROR READY and the green LED on my virtual floppy drive (8:19.0) will blink. And it works perfectly with my older image files, that are not from this site. They can be mount, list and load prg-s from them. PS.: I examined a few of these .d64 files in a hex-editor and they HAVE content. I recognize some of the text. So, it has to be something with the file format itself. Maybe it's not a valid .d64 file and needs some kind of conversion. PS (2).: Geez, finally I got it! I've got a special character in the path name where I've downloaded these .d64 files. Moving them to another place (for example to the root of drive C:) solved the problem. In spite of all these I don't delete my comments, 'cos maybe it can be helpful to someone who makes the same mistake. VICE doesn't like unicode in path name! 🙃
@harjitkaur7444
@harjitkaur7444 3 года назад
FINALLY RUN 🏃‍♂️ 🙌 👏 😌 THE PROGRAMER
@BillAnt
@BillAnt Год назад
A quick question, does the INC $D020 command cycles through the values x00 to xFF, and the DEC $D021 from xFF to x00 then wraps around in the endless loop? And what happens when it reaches a non-valid screen color value since the C64 has a limited number of them?
@8_Bit
@8_Bit Год назад
If $D020 was a regular 8-bit RAM location then yes, that's exactly what would happen, cycling from $00 to $FF and then wrapping around. But since $D020 is actually registers on the VIC-II chip, and only the low 4 bits are active (16 different colours), the high 4 bits are permanently set to 1. So the register is actually just cycling from $F0 to $FF and then back to $F0.
@BillAnt
@BillAnt Год назад
​@@8_Bit - Thank you Robin for another excellent explanation. I need to brush up on my VIC-II addresses/registers using my trusty hard copy of C64 Programmer's Guide and C64 Memory Mapping which have been in storage since the late 80's. heh :) Now, what happens if you INC or DEC any other regular RAM address (ex. screen x0401? Would it crash if going lower than 0 or over FF without bounds checking during a loop operation, or it wraps around like a VIC register?
@8_Bit
@8_Bit Год назад
@@BillAnt RAM locations will wrap around automatically and will never cause a crash.
@dannejendinger1847
@dannejendinger1847 4 года назад
I have a stupid question.. Backarrow + p should give me a submenu where I can change the border and background color for the editor. I can't get it to work. When I press ba+p nothing happens. Im coding on a "The C64". Love the channel!
@8_Bit
@8_Bit 4 года назад
Aha, looks like the preferences was removed from TMP 1.2 and moved into its own file. Look through this changelog for "TMPPREFS v1.2" for some documentation on using it: turbo.style64.org/docs/turbo-macro-pro-changelog It's included on this disk image if you don't have it: style64.org/release/turbo-macro-pro-sep06-style
@dannejendinger1847
@dannejendinger1847 4 года назад
@@8_Bit Thank you Robin! you are the best! ❤️😃
@MrGoatflakes
@MrGoatflakes 5 лет назад
Hi Robin, I've just gotten my hands on a Commodore 128 with working 1084S monitor and some quad density 5.25" discs and 1541 disc drive. All in excellent condition except for the disc drive. The FDD was said to be working before I bought it, but something must have come astray in transport or me trying to set it up. because the disc motor doesn't start and disc reports as not present, even though the light on the drive does come on. I'm in communication with the guy and he's sending me an extra serial cable in case that is the issue. If not I guess I'll have open up the enclosures and see if I haven't knocked the connectors off the board and resolder them if so. But disc troubles aside, I now have a Commodore 128 and want to develop new programs and libraries in assembler, but I don't have an REU. and it seems I'm not likely to get one any time soon. So instead of TMP+REU I have been using Merlin 128 on VICE, my version of which only runs in 80 column mode. Which will require an RGBI connector (and a sd2iec or something, which I probably will need anyway) if I want to eventually use it on my Commodore 128. Another reason I am currently using Merlin 128 is that I'm working through (half way done!) _Commodore 128 Assembly Language Programming_ by Mark Andrews and typing in the examples and playing around with them. When I was getting started it was fairly helpful to use one of the three full featured assemblers used in the book (Merlin 128, Total Software Development System by NoSync or Commodore 64 Macro Assembler Development System by CBM). Although now I think I could use any 6502 assembler it's just a matter of convenience and ease of use and exchanging source code. Perhaps when I get more experienced in 6502 assembler I will be able to modify Turbo Macro Pro to instead of "bank switching" with the REU instead use the C=128's in built MMU to bank switch to accomplish the same thing. Maybe adding 80 column support as well... Yes I know the REU doesn't really bank switch rather it copies to and fro between the Commodore's memory and the large memory in the cartridge using DMA. My question to you is that what do you think would be a a good interim solution? Merlin 128 seems better maybe because it uses 80 column mode, but it otherwise seems pretty clunky in many ways, and to be honest assembly doesn't really use more than a few tens of columns anyway unless you are the habit of putting in wordy comments, which I am, a "bad habit" I picked up at university :P For example weird clunkiness of Merlin 128, picking lowercase with {shift}{C=} doesn't appear do anything, and the assembler is forced to uppercase but the comments are lowercase. You can force uppercase comments by using {caps lock}, but I don't know if that means that instead the comments will actually be upper cased and appear as graphics characters and therefore unreadable except to the real wizards when selecting the uppercase+graphics charset, or if the actually assembler will be scrambled that way or what but it seems weird and fucky and probably doesn't seem the best for portability between assemblers? It saves sources as .S files, but I have no actual clue if they are just plain text files, not do I know an easy way to check except maybe for using the MONITOR, as it does list the memory address it uses for source and object... Perhaps this character set weirdness is due to the way the VDC does text? I know it's supposed to support underline and all sorts of weird shit, but don't know the details yet.
@8_Bit
@8_Bit 5 лет назад
Congrats on getting the 128! Hopefully you get the disk drive problem worked out. Are you specifically wanting to develop C128 mode programs? If not, I'd recommend just using the non-REU version of Turbo Macro Pro which is included on the same .d64. As long as you're developing smaller programs you shouldn't have much trouble with it. Otherwise, another C128-mode assembler to look at is Power Assembler (aka Buddy) which I've heard recommended before, but I've never used it myself.
@MrGoatflakes
@MrGoatflakes 5 лет назад
@@8_Bit I want to make programs that will run on the C=64 for the most part, but I would also like to try my hand at exploiting the C=128's extra features. Maybe in the same program by testing to see what features are present?
@8_Bit
@8_Bit 5 лет назад
@@MrGoatflakes You could totally use C64 TMP to use some C128 features that are available to C64 mode, such as 2 MHz mode. You could even use TMP in C64 mode to write C128-native programs, but there would be the extra hassle of switching back and forth between modes. I'd recommend starting by exploring C64 mode anyway before you start getting into C128 mode. You can always apply what you learn to another assembler later.
@MrGoatflakes
@MrGoatflakes 5 лет назад
@@8_Bit right because it's all just reading and writing values to particular addresses in 6502 assembler, right? And if the right hardware is attached hopefully it will do something xD But does TMP run alright on a C=128 without a GO64 first?
@8_Bit
@8_Bit 5 лет назад
@@MrGoatflakes You need to GO64 (or power up or reset with C= key held down) to run TMP on a C128, but since it's the same processor, TMP is capable of creating object code that a C128 can run. The thing I'm not sure about is whether you'd need to assemble to disk, or if enough RAM survives intact between the two modes that you could quickly switch between the two modes to test your code. Either way, learning 65XX assembler and the C64 architecture will all help you towards your goal, and it's very accessible, so imo, go for it :)
@sbaker1951
@sbaker1951 3 года назад
Is there a way to access SS from within TMP via a specific keystroke inside of VICE as you illustrate at 12:56?
@8_Bit
@8_Bit 3 года назад
VICE should have a "Cartridge Freeze" option that will be equivalent to pressing the button on the Super Snapshot cartridge. On the old Mac build of VICE I have, Cartridge Freeze appears under the Machine pull-down menu if you have a Super Snapshot .crt file attached. The shortcut for it it Apple+Z. Other versions should have something similar.
@sbaker1951
@sbaker1951 3 года назад
@@8_Bit Again, thank you so much for your prompt reply. Yes, the 'cartridge freeze' option found in VICE v3.5 in the 'File' menu immediately opened to SS Sub-System Menu allowing Code Inspector V5 to open with the 'M' key. Pressing 'X' returns to the SS Sub-system Menu; pressing '7' returns to the BASIC 'READY' screen. At this point however, typing 'SYS 320' does nothing. It was necessary to re-invoke TMP with 'SYS 32768 to return to the TMP edit screen. Invoking (Alt+H) inside of TMP opened the VICE Monitor. Yes, typing 'Alt+Z' works just as you show in the video. In the TMP edit screen, typing 'Alt+Z' immediately opened SS to the Sub-System Menu allowing Code Inspector V5 invocation via the 'M' key or by pressing '5' then '1'. I cannot adequately express how helpful your information was - without it, the stress was immense. My frustration level was astronomical bordering on cardiac arrest, so again, thank you for helping to make using TMP possible as a learning tool to follow along with your lessons.
@presauced
@presauced 3 года назад
This is just amazing.
@phononify
@phononify 3 года назад
Found quite a significant bug in TMP (Last version, REU): Using the "load-to-ram" option (R-l) you are asked correctly if you would like to use the starting address found in the file, but when using this, the actual loaded content still contains the starting address in the byte stream in little-endian. Only when you translate the memory content by make-data (6) you get the wanted bytes back. So loading memory is buggy - take care mates.
@phononify
@phononify 3 года назад
For example you have a character set as prg file with $2000 as start adress the loaded data in memory starts than with $00 $20 ... ouch
@randomscribblings
@randomscribblings 5 лет назад
I think what I need is just one more tool. I think you used something to provide a monitor/debugger? I tried a fastload cart image --- that seemed to just lockup vice. I think I've seen you use supersnapshot ... which seems to have vice support ---- but do I still need an image? I've identified $fb/fc and $fd/fe as locations I can use as proxy pointers. That's good enough for some experimentation... but ... I need some debugging support.
@8_Bit
@8_Bit 5 лет назад
Since you're using VICE, you can use the monitor built into it: vice-emu.sourceforge.net/vice_12.html Otherwise, yeah, you'd need a Super Snapshot v5 .crt image and plug it in with the "attach cartridge" option in VICE. But the VICE monitor is very powerful.
@randomscribblings
@randomscribblings 5 лет назад
I actually accidentally discovered the VICE monitor while I was waiting for you to respond :). I was trying (and failing) to attache a final cartridge III (which I found before finding a super snapshot) and it was hanging the CPU ... at which point VICE was giving me a dialog offering to start the monitor. ... yes... even the fact that the monitor is another window is a handy debug tool. So... now my development environment is VICE + 1541 + 1581 + 512K MEU... and using the vice monitor. (in case you were wondering, my errors boiled down to addressing mode problems). Thinking about this, in terms of your videos... for someone coming back to C=64 after some time away (most of us) the biggest thing to cover (I think) is the (zp),y addressing mode. The only other alternative is self modifying code (code that writes the pointer into the instruction that uses it) ... or offsets that never exceed 255 bytes. Some expert advice about the various consequences of pillaging zero page addresses might be welcome too. Even some research that separates which is used by KERNEL and which is used by BASIC. Stop me if you think I'm rambling.
@Starredmediasoft
@Starredmediasoft 4 года назад
Turbo Macro Pro is an excellent software for assembly, however I continue to prefer Turbo Assembler 7.4
@sociologie4507
@sociologie4507 5 лет назад
Excellent stuff sir!
@rickthatch3556
@rickthatch3556 Год назад
hey robin, I am developing a sizeable application in assembly using turbo macro pro as you suggested... however, I have built a few small programs and now want to merge them together but I don't see a way to do that with turbo in the docs...
@8_Bit
@8_Bit Год назад
You can use the back arrow W command to Write the source out to a sequential (text) file, and then back arrow E to Enter the sequential file into the current source. It'll merge it in wherever the cursor is currently.
@rickthatch3556
@rickthatch3556 Год назад
@@8_Bit very cool! thx!
@randomscribblings
@randomscribblings 5 лет назад
Sorry for cluttering up the contents... but I just hit another brick wall -ish. So... I've written my little thing and I want to share. Obviously I can share a d64 (cool enough) but I also want to pull the text of my assembly out. Now here's the thing: c1541.exe will extract (it seems) PRG files as .P00 (I think?) but it seems to not acknowledge the existence of seq files. Now... I also notice that TMP seems to support saving your source code as PRG files. I'm not sure what to expect there --- does it add line numbers to make it work? Obviously if it tokenizes anything, that will make it hard to export, too. I had a vague thought of figuring out the ethernet card to get a terminal program to talk to a BBS or telnet port ... but this can't be the only option ?!?
@8_Bit
@8_Bit 5 лет назад
CBM DOS assumes PRG files unless told otherwise by adding a comma and the file type to the end of the file name. So MYSOURCE,SEQ or shortened to MYSOURCE,S should allow c1541 to find those files on the d64. It shouldn't be converting them to .P00 or whatever, try the "read" command. In TMP, it sounds like you've been using the W (write) command to save your source? That's fine (and desired if you want a human-readable text file) but typically I use the S (save) command as it's faster and uses less disk space. It saves them as PRG files but yes, it's pre-tokenized (or more accurately, partially pre-assembled) and the files are only intended to be loaded (L) back into TMP again.
@randomscribblings
@randomscribblings 5 лет назад
Interestingly, I tried ",s" with c1541 and it didn't seem to work.
@8_Bit
@8_Bit 5 лет назад
Here's a brief terminal session on my Mac, where I use c1541 to pull a sequential file out of a .d64 into the Mac file system. Hopefully it's helpful: $ c1541 1nvadersource2.d64 c1541 V4.2 (VICE 3.2) Copyright 1995-2018 The VICE Development Team. C1541 is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type `show copying' to see the conditions. There is absolutely no warranty for C1541. Type `show warranty' for details. c1541 #8> list 0 "SOURCE2 " 2a 214 "inv505a.s" seq 450 blocks free. c1541 #8> read inv505a.s,s reading file `inv505a.s,s' from unit 8 c1541 #8> exit $ ls 1nvadersource2.d64 inv505a.s
@jimmelb
@jimmelb 4 года назад
Hi, this is great!! but can this be run on the C64 Maxi? You know the full size emulator. I can't seem to find the files that work on it. Can you do a video on how to load it up and which files to download please?
@8_Bit
@8_Bit 4 года назад
Hi, yes it works on TheC64, and I showed it in this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-z2GACGEucTI.html Check out "24:56 Assembly language programming with Turbo Macro Pro" and in the video description is a download for Turbo Macro Pro.
@jimmelb
@jimmelb 4 года назад
Thank you!!
@orientbeachbum8346
@orientbeachbum8346 4 года назад
Is bombjack still in operation? I got the msg that it's got a doubtful security certificate and when I tried to access the site anyway, I got the msg that the site couldn't be found.
@8_Bit
@8_Bit 4 года назад
Looks like it moved: commodore.bombjack.org/index.htm
@salao9811
@salao9811 3 года назад
how to use macros under tmp? there are no backlash on the c64 ? can you pls tell us how to make macros using parameters ?
@8_Bit
@8_Bit 3 года назад
I just recently learned that the documentation included in the TMP download on style64.org has a bug when it was converted from PETSCII to ASCII. Those backslashes should be the UK pound symbol. Once you use that symbol then the rest of the documentation should be correct for using parameters in your macros.
@salao9811
@salao9811 3 года назад
@@8_Bit great, thx 👍
@jack002tuber
@jack002tuber 4 года назад
Robin, I have TMP for Vice now, used it, I have a problem. Basic Rom is gone. I was able to call $BDCD before without TMP, but I can't call it now. Even with REU it will not work. Can we not call basic rom calls with it? (this works fine on a 64 with just a monitor program)
@8_Bit
@8_Bit 4 года назад
BASIC ROM calls should still work. Are you changing location 1 in your program? Maybe you're switching the BASIC ROM out? If your program is short enough, type it out here and I'll see if I can figure out what's up, otherwise post a link to your work disk (.d64 or whatever) and I'll check it out.
@jack002tuber
@jack002tuber 4 года назад
; this prints a clock start lda #$00 ldx $a0 jsr $bdcd jsr spc lda #$00 ldx $a1 jsr spc lda #$00 ldx $a2 jsr $bdcd jsr $e544 jsr $ffe1 bne start brk spc lda #$20 jsr $ffd2 rts
@jack002tuber
@jack002tuber 4 года назад
Thank you for looking! Its short. Gets the clock from A0-A2 and prints to screen
@jack002tuber
@jack002tuber 4 года назад
It fails at the JMP $BDCD
@8_Bit
@8_Bit 4 года назад
@@jack002tuber Aha, yeah, I forgot TMP doesn't seem to reset location 1 properly. You can can LDA #$37 STA 1 at the beginning of your program and that'll switch the ROM back in and it should work. Alternatively, after you assemble, use Back Arrow 1 to drop out to BASIC, and then you can SYS 4096 or whatever to start your program.
@saintofchelseathomascarlyl5713
@saintofchelseathomascarlyl5713 3 года назад
i wish i understood what is going on here i downloaded frodo c64 emulator to my phone
@fuzzybad
@fuzzybad 5 лет назад
Good stuff! How about an intermediate level assembly tutorial showing the TMP+REU functionality?
@8_Bit
@8_Bit 5 лет назад
I think I'll use TMP+REU next time, yes! And I'll write a longer program too :)
@robertlock5501
@robertlock5501 2 года назад
6:15 I'm still rather green with assembly so forgive the question if it's painfully rudimentary, but why 3 cycles for what would seem to be a rather simple JMP instruction?
@robertlock5501
@robertlock5501 2 года назад
Oh wait - I think I see why: because the there is the OP-code 4C, then the two bytes for the location?
@8_Bit
@8_Bit 2 года назад
Yes, the 6502 takes at least 1 cycle per byte; it processes the opcode, then the low bytes of the address, then the high byte. All instructions (ranging from 1 to 3 bytes in length) take from 2 to 7 cycles to execute. This might seem like a lot but was actually super efficient at the time. Other CPUs of the era like the 8080/Z80 required many more, and that's why a 1 MHz 6502 can keep up with a 3 MHz Z80 on most tasks. For more information about 6502 timing, look for this file online: 64doc.txt
@robertlock5501
@robertlock5501 2 года назад
@@8_Bit Interesting. The 65xx series was a pretty capable CPU from the sounds of things. Cool to be getting into some C64 programming. (I come from a TI-99/4a background ;) ).
@robertlock5501
@robertlock5501 2 года назад
@@8_Bit Oh yeah, nearly forgot my manners: thanks for doing these videos - I've been learning a lot B)
@harjitkaur7444
@harjitkaur7444 3 года назад
CHANGE OF MEMORY
@VepsianGameDesigner
@VepsianGameDesigner 5 лет назад
Super lesson!
@Havanacuba1985
@Havanacuba1985 4 года назад
So the bottom of code is 7feb 32747 and the assembler starts at 32768. I think I learned something.
@JesusisJesus
@JesusisJesus 5 лет назад
Can someone please explain to me why Commodore designed the RESTORE key to not function unless you smashed it?
@8_Bit
@8_Bit 5 лет назад
Apparently Commodore put the wrong capacitor on the Restore key line! There are some articles online about how to fix this. Some revisions don't have this problem, apparently.
@MrGoatflakes
@MrGoatflakes 5 лет назад
For those following along with VICE, the back arrow key is underscore in the standard symbolic mapping :P
@8_Bit
@8_Bit 5 лет назад
Interesting. I'm running VICE on OSX with a symbolic mapping (for example, it's Shift+8 to get the asterisk) but it's the tilde key in the top left for the back arrow still, which is positional. Must vary between builds.
@Eightbitswide
@Eightbitswide 5 лет назад
Any chance we could get you to build on this with lessons 2,3,4......... ?
@8_Bit
@8_Bit 5 лет назад
Definitely. I'm working on a script outline for #2 right now :)
@harjitkaur7444
@harjitkaur7444 3 года назад
4C NEXT LINE OF JUMPED ROW
@harjitkaur7444
@harjitkaur7444 3 года назад
ASSEMBLED YOUR MEMORY
@EVPaddy
@EVPaddy 5 лет назад
y remember doing this in the early eighties. just with absolute addresses though.
@randomscribblings
@randomscribblings 5 лет назад
Thank-you for the video. It's inspired me to get VICE out again. After some false starts and other conundrums, I've got TMP working. :). So... my first seemingly unsolvable problem is "serial device number". It plainly prints out "#8" in the bottom line... indicating that it's keyed to talk to device number 8. How do I change that number?
@8_Bit
@8_Bit 5 лет назад
Back arrow d cycles through available device numbers. Check out style64.org for full docs. 👍
@randomscribblings
@randomscribblings 5 лет назад
Urgh. That is frustrating. I searched that page for "disk" and "unit" and didn't find that line. THANK-YOU!
@edwilson7187
@edwilson7187 Год назад
No reset so I save before I run the file. If it works properly I just save over the older version.
@HalKick2000
@HalKick2000 5 лет назад
AUTODUEL! Great game back then!
@Jdvc-yd5tx
@Jdvc-yd5tx 2 месяца назад
I'm presently learning Archimedes Assembly, and the 'books' are 90% rubbish. Acorn Risc OS was on a ROM, something that would be impossible in our criminal gulag today, where security updates are mandatory once a month. Today has never been a better time to be poor and broke. It seems that no one learned their lesson from 9-11 on Sept 11, 2001. 😎 🖋
@jasongins
@jasongins 5 лет назад
Great video. In a future video, could you show how to save the code to disk?
@8_Bit
@8_Bit 5 лет назад
Will do. In the meantime, back arrow S saves source to disk, back arrow L loads source, and back arrow 5 assembles the object code to disk.
@harjitkaur7444
@harjitkaur7444 3 года назад
TOTAL OF 9 CYCLES 🚲
@mmx555
@mmx555 5 лет назад
hi can you make a video about GeckOS . it would be great if you run it with two 6502. communicate, remote login etc. thanks.
@8_Bit
@8_Bit 5 лет назад
Hi, thanks for the suggestion. I put it on my list of possible episodes, but it might take me a lot of research to set up, especially the networking on it., so I'm not sure it'll be any time soon.
@ralfschulke1298
@ralfschulke1298 5 лет назад
nice job, i love it.
@0730bcorm
@0730bcorm 4 года назад
How did you get Turbo Macro Pro on a 5 1/4 inch disk?
@0730bcorm
@0730bcorm 4 года назад
So you wrote to a blank disk using the zoom floppy and the 1541 then could I just load the floppy into my breadbin?
@8_Bit
@8_Bit 4 года назад
Yeah, the Zoom Floppy allows you to hook a 1541 (or most other Commodore compatible drives) up to your PC/Mac and then you can transfer .d64 files and more from your PC to a floppy disk. Then you can use that disk with your C64+1541.
@0730bcorm
@0730bcorm 4 года назад
Honestly sounds like a better option than sd2iec for a lot of programs. Does this work with high density disks?
@8_Bit
@8_Bit 4 года назад
@@0730bcorm High-density floppies don't work reliably on double-density drives, unfortunately, due to a different coercivity in the magnetic coating. You might get it to work sometimes, but the disks don't last if they worked at all. I did a full video about the subject: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-1LCTDqoKYjE.html
Далее
10x Faster Than C64 BASIC? Hare Basic
48:01
Просмотров 34 тыс.
Как не носить с собой вещи
00:31
Просмотров 937 тыс.
6502 Assembly Language: Getting Started
45:43
Просмотров 33 тыс.
Adding Hex Support To C64 BASIC
28:29
Просмотров 21 тыс.
Assembly Language Snow Day!  Learn ASM Now!
32:13
Просмотров 105 тыс.
Book Club: Commodore 64 Programmer's Reference Guide
40:16
computers suck at division (a painful discovery)
5:09