Opinions for Assembly Tutorial Videos

Description of your first forum.
Post Reply
User avatar
PJW
Posts: 24
Joined: Wed Apr 24, 2019 12:44 am

Opinions for Assembly Tutorial Videos

Post by PJW » Thu May 30, 2019 2:06 am

I'm thinking about what further videos I want to make, and a tutorial series on 65816 assembly seems likely. Based on feedback I've gotten, I think I'll start it off with tool setup, but I'm wondering how I want to approach the actual assembly language part. The 65816 is essentially a 6502 with additional registers, some wider registers, and some additional instructions. Which would make more sense:
  1. Start off with a 6502 assembly and then treat the 65816 differences as a sort of later chapter, or
  2. Target it for the 65816 specifically from the start, with a few comments to point out where the 6502 was different.
As an example of the differences, in the first case, I would have a section talking about zero page addressing modes and how zero page registers can be used for various programming constructs. Then later I'd have to say "now in the 65816, it's not just zero page anymore, you can do blah blah blah..." In the second case, I wouldn't mention zero page at all but just explain direct page addressing modes, with maybe a parenthetical comment that in the 6502, the direct page register is effectively set to 0.

In any case, I'm thinking the videos would assume the viewer is familiar with programming but not necessarily assembly. So the viewer would be expected to know what bits, bytes, variables, arrays, and loops would be, but wouldn't need to know what a register is, for example.

Any thoughts from potential viewers?
User avatar
stef
Posts: 64
Joined: Thu Jan 01, 1970 12:00 am
Location: Somewhere in the Universe
Contact:

Re: Opinions for Assembly Tutorial Videos

Post by stef » Thu May 30, 2019 5:22 am

PJW wrote:
Thu May 30, 2019 2:06 am
I'm thinking about what further videos I want to make, and a tutorial series on 65816 assembly seems likely. Based on the feedback I've gotten, I think I'll start it off with tool setup, but I'm wondering how I want to approach the actual assembly language part. The 65816 is essentially a 6502 with additional registers, some wider registers, and some additional instructions. Which would make more sense:
  1. Start off with a 6502 assembly and then treat the 65816 differences as a sort of later chapter, or
  2. Target it for the 65816 specifically from the start, with a few comments to point out where the 6502 was different.
As an example of the differences, in the first case, I would have a section talking about zero page addressing modes and how zero page registers can be used for various programming constructs. Then later I'd have to say "now in the 65816, it's not just zero page anymore, you can do blah blah blah..." In the second case, I wouldn't mention zero page at all but just explain direct page addressing modes, with maybe a parenthetical comment that in the 6502, the direct page register is effectively set to 0.

In any case, I'm thinking the videos would assume the viewer is familiar with programming but not necessarily assembly. So the viewer would be expected to know what bits, bytes, variables, arrays, and loops would be, but wouldn't need to know what a register is, for example.

Any thoughts from potential viewers?
PJW,

My take on it... Is that since there are a few new retro computers in the work that are based on the 65C816 and that there is probably a ton of codes and tut on the 6502 already. I guess learning about doing the transition might be a better idea. A lot of peeps know the 6502 but very little knows about its counterpart and considering that the 816 is fairly tricky, I think it would be very interesting.

But this is just my 2 cents!

Cheers
S
Mistress of All Villainy
User avatar
tomxp411
Posts: 10
Joined: Thu May 09, 2019 11:19 pm
Location: California, USA

Re: Opinions for Assembly Tutorial Videos

Post by tomxp411 » Thu May 30, 2019 9:36 pm

I'd probably go at it from an algorithm approach. I've always learned as I go, so I like to do practical examples, then loop that back to theory.

So you can start with something simple, like filling the screen with $20 to clear the display. Live code the example, then go back and explain how it works. Right away, explain how you had to set the M flag to 1 to make memory I/O 8 bits, but cleared the X flag to make the index registers 16 bits. This gets the person used to the idea that
SEP $20
REP $10
Is setting the system up with an 8-bit accumulator and 16-bit index registers.

Likewise, build up good patterns right away, like my "P Last/First" rule (PHP last when entering a subroutine and PLP first, so that the M and X flags are consistent.)

Then in the next lesson, you can take the fill screen example and expand that into a memory copy example.

In the third lesson, you can then take the memory copy example and turn it into a "print a string" example, by adding a BNE to test for a null terminator.

in the next lesson, you can read from the keyboard buffer and print the key on the screen.

Then expand that to use the arrow keys to move a block around on the screen.

The make the block fall and look for something below it.

Then rotate the block.

If you've guessed by now that the viewer will end up with a Tetris game, you get a gold star. ;-)
jamesd
Posts: 4
Joined: Wed May 29, 2019 10:44 pm

Re: Opinions for Assembly Tutorial Videos

Post by jamesd » Fri May 31, 2019 4:45 pm

After more than 30 years of false starts I'm finally learning assembly language programming. I have a long way to go but I am making progress. I'm currently using CBM Studio to write code for the C128.

I would really love to see tutorials centered around assembly language programming for the C256 Foenix.
===============================
I want a "Silence of the Lambs" lunchbox
mac
Posts: 3
Joined: Mon Apr 22, 2019 6:54 pm

Re: Opinions for Assembly Tutorial Videos

Post by mac » Sun Jun 02, 2019 1:58 pm

PJW wrote:
Thu May 30, 2019 2:06 am
I'm thinking about what further videos I want to make, and a tutorial series on 65816 assembly seems likely. Based on feedback I've gotten, I think I'll start it off with tool setup, but I'm wondering how I want to approach the actual assembly language part. The 65816 is essentially a 6502 with additional registers, some wider registers, and some additional instructions. Which would make more sense:
  1. Start off with a 6502 assembly and then treat the 65816 differences as a sort of later chapter, or
  2. Target it for the 65816 specifically from the start, with a few comments to point out where the 6502 was different.
As an example of the differences, in the first case, I would have a section talking about zero page addressing modes and how zero page registers can be used for various programming constructs. Then later I'd have to say "now in the 65816, it's not just zero page anymore, you can do blah blah blah..." In the second case, I wouldn't mention zero page at all but just explain direct page addressing modes, with maybe a parenthetical comment that in the 6502, the direct page register is effectively set to 0.

In any case, I'm thinking the videos would assume the viewer is familiar with programming but not necessarily assembly. So the viewer would be expected to know what bits, bytes, variables, arrays, and loops would be, but wouldn't need to know what a register is, for example.

Any thoughts from potential viewers?
Option 2, definitely option 2. There are a lot of 6502 tutorials out there but not enough on the 65816. Having first heard about it thru this (C256 Foenix) project, I'm wishing that I had learned about it back in the day.

Also, I like Tom's suggestion for making the videos practical and relating to the C256 hardware, there are going to be a lot of videos for other platforms but if we are going to write for the Foenix we need to start learning how to now.
jamesd
Posts: 4
Joined: Wed May 29, 2019 10:44 pm

Re: Opinions for Assembly Tutorial Videos

Post by jamesd » Mon Jun 03, 2019 6:01 pm

I did a bit of looking around last weekend and I'm somewhat lost on the tools side of things.

I would love a tutorial which starts off with how to set up the tools, and at least a quick tutorial on a simple program or how to links of some sort to get started.

Then tutorials on programming for the C256.
===============================
I want a "Silence of the Lambs" lunchbox
User avatar
PJW
Posts: 24
Joined: Wed Apr 24, 2019 12:44 am

Re: Opinions for Assembly Tutorial Videos

Post by PJW » Mon Jun 03, 2019 10:45 pm

Thanks everyone. What I'm taking from this is that a more practical, 65816 and C256 focused set of tutorials is what's wanted---starting with tools setup and working up through practical examples to cover the 65816 features as they go. Let me know if I've got that wrong or if you have a different request.

I probably won't start this immediately, as I'm trying to get a some simple interactivity into the BASIC interpreter, but I'd like to start working on the series soon (within a couple of days).
jamesd
Posts: 4
Joined: Wed May 29, 2019 10:44 pm

Re: Opinions for Assembly Tutorial Videos

Post by jamesd » Tue Jun 04, 2019 2:10 am

That would be very awesome.
===============================
I want a "Silence of the Lambs" lunchbox
User avatar
tomxp411
Posts: 10
Joined: Thu May 09, 2019 11:19 pm
Location: California, USA

Re: Opinions for Assembly Tutorial Videos

Post by tomxp411 » Tue Jun 04, 2019 6:17 am

jamesd wrote:
Mon Jun 03, 2019 6:01 pm
I did a bit of looking around last weekend and I'm somewhat lost on the tools side of things.

I would love a tutorial which starts off with how to set up the tools, and at least a quick tutorial on a simple program or how to links of some sort to get started.

Then tutorials on programming for the C256.
The tools are nice and simple... a good text editor, such as Atom or Notepad++ and an assembler. I prefer 64TASS, because it can output straight to Intel Hex files and because it has a great alternate syntax for all the weird address modes the 65816 supports.

https://sourceforge.net/projects/tass64/

Assembling your program is fairly easy. I use a batch file to assemble my programs and place them in the right location. Here's an example:

Code: Select all

@echo off

rem Make sure the desired directories are in place. 
md ..\bin
md ..\bin\debug
md ..\bin\debug\roms

rem This actually assembles the code. Since my emulator loads Hex files, I output 
rem to Intel hex. 
:start
del *.lst
64tass kernel.asm --long-address --intel-hex -o kernel.hex --list kernel.lst
if errorlevel 1 goto fail

rem Put the files where they belong
copy kernel.hex ..\bin\debug\roms
copy kernel.lst ..\bin\debug\roms

rem retry if something went wrong. 
:fail
choice /m "Try again?"
if errorlevel 2 goto end
goto start

:end
echo END OF LINE
bzuidgeest
Posts: 41
Joined: Wed May 01, 2019 6:51 pm

Re: Opinions for Assembly Tutorial Videos

Post by bzuidgeest » Wed Jun 05, 2019 2:08 pm

PJW wrote:
Thu May 30, 2019 2:06 am
I'm thinking about what further videos I want to make, and a tutorial series on 65816 assembly seems likely. Based on feedback I've gotten, I think I'll start it off with tool setup, but I'm wondering how I want to approach the actual assembly language part. The 65816 is essentially a 6502 with additional registers, some wider registers, and some additional instructions. Which would make more sense:
  1. Start off with a 6502 assembly and then treat the 65816 differences as a sort of later chapter, or
  2. Target it for the 65816 specifically from the start, with a few comments to point out where the 6502 was different.
As an example of the differences, in the first case, I would have a section talking about zero page addressing modes and how zero page registers can be used for various programming constructs. Then later I'd have to say "now in the 65816, it's not just zero page anymore, you can do blah blah blah..." In the second case, I wouldn't mention zero page at all but just explain direct page addressing modes, with maybe a parenthetical comment that in the 6502, the direct page register is effectively set to 0.

In any case, I'm thinking the videos would assume the viewer is familiar with programming but not necessarily assembly. So the viewer would be expected to know what bits, bytes, variables, arrays, and loops would be, but wouldn't need to know what a register is, for example.

Any thoughts from potential viewers?
A little late maybe, but I'm also for option 2. Stick to the actual platform speaking about others first makes things confusing.

Maybe you can take some inspiration from https://www.youtube.com/channel/UC4hnwm ... ICAieAUEZA. The few videos in this channel are among the better retro assembly examples I found. Yet still leave a lot to be desired. Things like knowledge of monitor commands and such are assumed as well as opcodes and structure and are not properly explained. I could fill in those blanks, but that defeats the purpose of such videos.

your assumptions about the viewer made in your last paragraph seem to be about correct.

If your worried about boring videos. Make sure you mix cold knowledge with practical (not necessarily real world) examples. Assume a hands on approach and users following along with you demonstrations. be yourself and don't go for a perfect script. mistakes and the explanations of those mistakes can also be interesting.
Post Reply