MAC/65 Assembler Editor and Atari 8-bit Machine Language Programming - Part 10

  Рет қаралды 471

David Arlington

David Arlington

Күн бұрын

Пікірлер: 23
@davidarlington1206
@davidarlington1206 Ай бұрын
Just some minor notes this time: 1) I broke one of my own rules at 38:30, should have kept that label to 6 chars like MOVMEM :) 2) At 47:00 or thereabouts, I'm not sure that LDY #$00 at line 430 is really necessary (since it should still be 0 from rolling over) but it doesn't hurt anything there. Overall, this may be the video I'm most happy with how it came out as far as content is concerned.
@PicaDelphon
@PicaDelphon Ай бұрын
Your giving me 80's Programing Flash Backs..
@user-nd8zh3ir7v
@user-nd8zh3ir7v Ай бұрын
I really enjoy this content, keep up the good work! thx
@KaltOhm
@KaltOhm Ай бұрын
This series is so fascinating! I really appreciate your efforts and the incredible value of preserving this knowledge about the early times of personal computing. Thanks and please keep this great work coming!
@davidarlington1206
@davidarlington1206 Ай бұрын
Thanks for the kind words. I've been having fun rediscovering the things that got me started as a developer in the first place, long ago!
@STN-t5k
@STN-t5k Ай бұрын
@@davidarlington1206 Yeah, this series is great. I love how you take the time to go into the subject in detail, 80 minutes seems about the right length for it.
@davidarlington1206
@davidarlington1206 Ай бұрын
@@STN-t5k I can't seem to get away from that 80 minutes length despite my best plans LoL
@AlexEvans1
@AlexEvans1 Ай бұрын
How about: 420 bne mvpage 430 ; 440 ;
@davidarlington1206
@davidarlington1206 Ай бұрын
Yeah, watching it back I realized I didn't really need 430 and if I don't need that then your suggestion is the best way. Those are the things you clean up AFTER you make sure it's working and you have a bunch of tests to test it. Or when you're watching it back LOL
@STN-t5k
@STN-t5k Ай бұрын
@@davidarlington1206 On a similar note, the loop for the reminder could be: iny cpy size bne move
@STN-t5k
@STN-t5k Ай бұрын
The loop for the reminder would also be shorter and faster if the X register was used to count how many elements are left to copy, instead of using the Y register to compare if it’s equal to the contents of the size variable. Maybe something like this? ldx size beq mvdone ldy #0 move: lda (srcadr),y sta (dstadr),y iny dex bne move
@AlexEvans1
@AlexEvans1 Ай бұрын
@@STN-t5k going that route you can reverse the copying order for the sub page portion. However, I think it was thought to be a smidge less clear.
@davidarlington1206
@davidarlington1206 Ай бұрын
@@STN-t5k I toyed around with using a DEX method but as Alex suggests and I've mentioned in the past, sometimes the decisions on a particular way to do something is more tied to make the code clear and understandable rather than teaching efficiency. That's also why I made a point to say in the video that I hope people are taking my explanations about what the code is doing and why as inspiration to write and find their own ways to do things. (Which you did which is exactly what I'm hoping for with these videos!) I want to show a way I think I can make clear to all levels and then let folks take the car out for a spin on their own. Alex's suggestion was more efficient than what I had but it doesn't lose any clarity either.
@nickfolino8228
@nickfolino8228 Ай бұрын
Interesting way of doing it. I've never copied single bytes in these routines. It's usually a page or 1k blocks at a time. Instead of reserving space in zero page, then setting variables, then writing code to put those variables into the reserved locations, it would be much easier to just store your data when you reserve the space. 130 SRCADR .WORD $E200 140 DESTADR .WORD $5000 Then you can eliminate lines 180, 190 and 210-300 It's much more easier to read too. Also the MVRMDR can be sped up using a decrement. If you load size into the x or y register you can just decrement that, no need to use another register to count up and compare it to SIZE Just count down and you only need the BEQ. I provided sample code in an earlier video. Great series! I like watching you do this live. Don't worry. We all make the same typing mistakes! Some of us more than you 🙂
@davidarlington1206
@davidarlington1206 Ай бұрын
1) What native 6502 instruction lets you copy a whole page at a time? 2) For the purposes of the demo, I could have put the source and destination values directly into zero page, but then it's a zero page constant not a variable and I was thinking ahead to the next video when SRCADR and DSTADR are going to be used several times with different values. 2a) In a side note, I DID try to set SIZE as a constant in zero page, but MAC/65 did not like that for some reason and overwrote my constant even though the compiler said it compiled OK. I'm going to investigate that later. As mentioned in the video, the MAC/65 manual is unclear about its own usage of the top half of zero page locations. 3) My first version of this DID use a decrement method for MVRMDR, but I wasn't happy with my explanations being as clear as they were for the way I ended up doing it. As mentioned in reply to some other comments, I'm not always looking for the fastest or most efficient way to do something, but rather something I can clearly explain the concepts and reasoning and then hopefully inspire people to try their own ways. It was also easier to explain the DDT testing part doing it that way and giving examples of testing was another goal here. I did try to make a point that there are plenty of examples of this code you can find a lot of places (especially since this logic is not Atari-specific) of how to code this subroutine and that I was sure someone could find a better way out there with just a little effort. A goal of the series though is not to tell people how to write code by telling them a certain way, but how to explain things so they can write their own code. Someone commented with a working example of the decrement way for MVRMDR and that made me feel great because that's what I'm hoping for in the end. I get you started, you think up better ways or your own ways on your own!
Installing Linux Like It's 1999 - Red Hat 6.1
34:00
ctrl-alt-rees
Рет қаралды 51 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 34 МЛН
Человек паук уже не тот
00:32
Miracle
Рет қаралды 3,6 МЛН
Это было очень близко...
00:10
Аришнев
Рет қаралды 7 МЛН
When mom gets home, but you're in rollerblades.
00:40
Daniel LaBelle
Рет қаралды 135 МЛН
Apollo Core Rope Memory (Apollo Guidance Computer Part 30)
49:03
CuriousMarc
Рет қаралды 549 М.
Crafting executables from raw bytes
26:43
Kay Lack
Рет қаралды 32 М.
Uncovering the Fake Cache BIOS Mystery and Fixing It!
45:19
Bits und Bolts
Рет қаралды 15 М.
Creating a window - Software from Scratch
1:04:12
Muukid
Рет қаралды 117 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 34 МЛН