Using the Commander X16 Integrated Assembly Environment

Ғылым және технология

The Commander X16 has a built-in assembly environment that doesn't get much attention. This is a quick demonstration of how to use it.
00:00 Intro
00:20 BASIC
01:13 Assembly with C-String
07:07 Assembly with P-String

Пікірлер: 54

  • @BobSellers6502
    @BobSellers6502 Жыл бұрын

    This is great! This is the kind of "gateway" experience people need to switch from BASIC to assembly. Once they outgrow this, the next step would be using a cross development computer and a good macro assembler like the cc65 suite.

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    I've been thinking about doing a video on that as well. The X16 project had been so exciting lately that there's so much to talk about.

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    I've recently done just that: kzread.info/dash/bejne/iGaqqcuCoae-m6Q.html

  • @tomwilson2112
    @tomwilson2112 Жыл бұрын

    This is a great video. CODEX has always been a little bit of a mystery to me, since it's kind of halfway between an assembler and a monitor. This video goes a long way toward demystifying that, showing its utility vs the Supermon monitor available with the MONITOR command. Again, great job!

  • @slithymatt
    @slithymatt Жыл бұрын

    Great video, Jestin!

  • @Dangerousdaze
    @Dangerousdaze Жыл бұрын

    Thanks for the video. Extra props for the correct K&R form of "Hello, world!" :)

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    Punctuation is important ;)

  • @petermuller608
    @petermuller608 Жыл бұрын

    Nice tutorial!

  • @jsmythib
    @jsmythib4 ай бұрын

    Your the only video source on this subject I can find. First mover advantage! :) This was a great 10 minute intro into codex. Make more! Humanity needs you lol :) Thankyou.

  • @jsmythib

    @jsmythib

    4 ай бұрын

    Sidenote. I forgot to exit my loop on my second itteration and x16 emulator exploded and took my desktop video with it, temporarily. So. That was exciting.

  • @IapetusRetroStuff
    @IapetusRetroStuff3 ай бұрын

    thanks

  • @TheUtuber999
    @TheUtuber999 Жыл бұрын

    Appreciate the mini-tutorial! In the second example, I just added RTS underneath BNE PRINT-LOOP and deleted RTS under the END label, so as to avoid the final BRA END instruction. Is it safe to assume BRA is not backwards-compatible with legacy 6502 assembly? I also noticed that if you exit back to Basic, then re-launch Codex, it will only show the first line of code... whereas you can then jump into MON and see the code you wrote earlier, and can invoke it from Basic using SYS $8000. Cool stuff and hope it evolves further in future code releases.

  • @nate6692
    @nate66925 ай бұрын

    You might want to avoid putting text at the very bottom as pausing the video blocks this with youtube controls.

  • @tomraidna8421
    @tomraidna84217 ай бұрын

    Nice video , too bad the save/load doesn’t work correctly with the .Cstr

  • @lupedarksnout
    @lupedarksnout6 ай бұрын

    6502 is my thing, but after nearly 30 years of using the PAL assembler (and an ML monitor) on my C64, I am definitely afraid of change. Even though PAL shares memory with the program it creates (where either can corrupt the other) it makes sense in my head. I have a feel for where things are. I can tweak, re-assemble, and re-run in seconds - and that's using the pesky BASIC editor (with line numbers) to write source code! I wonder if there are other options for directly assembling code on the Commander X16 - something similar to what I'm used to?

  • @digitaljestin

    @digitaljestin

    6 ай бұрын

    In the latest ROM, there's a built in text editor. There's also going to be a BASIC loader for text files (non tokenized), and hopefully an assembler sometime soon. Personally, I don't think CODEX should make the cut for the final ROM. It needs some fixes, the original dev isn't patching it, it's a little awkward to write anything large in, and it doesn't fit the development model the X16 is going towards. More likely it'll have an assembler that integrates into the text editor. Someone just needs to write it.

  • @OpenGL4ever
    @OpenGL4ever Жыл бұрын

    I have three questions: 1. Does it use the Microsoft floating-point number encoding or the standardized IEEE-754 floating-point format? 2. Does the BASIC count loops in floating point numbers or as integers? The early Microsoft Basic version did everything in MS floating point. This changed in the early 90 with Quick Basic on the PC. 3. Is the Commander X16 shipped with a extensive programming book?

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    1. Not sure, but I think MS floating point. The ROM has been licenced and forked from the C64, so whatever that used. 2. I'm pretty sure it's floating point for loop counters, for the same reason as above. 3. No official word on that yet, but I just so happen to be writing one that I hope becomes official. Even if so, it may not ship with the computer. github.com/X16Community/x16-user-guide

  • @OpenGL4ever

    @OpenGL4ever

    Жыл бұрын

    @@digitaljestin Thank you for your answer. If the ROM is the same, than it is definitely MS floating point. And i must also correct one of my statements above. The sentence "This changed in the early 90 with Quick Basic on the PC" belongs to the first question. I moved the question around and forget that sentence. Quick Basic and QBasic both use IEEE-754 floating point, while its predecessor GW-Basic and all the other home computer BASIC variants from Microsoft use MS floating point. In Quick Basic and QBasic there is a compatibility mode to use the old MS floating point format to ensure that old code and data can run and be used without problems. I don't know if Microsoft eventually switched to using integers for the loops, maybe in Visual Basic? Thank you for the info about the book. In my opinion a printed programming book shipped with the computer is a must for such a computer. Especially when it is aimed at young adolescents. Without that, it's just an empty machine that the user doesn't know what to do with. The only pity is that the machine uses a BASIC interpreter instead of a PASCAL compiler. Of course I can understand why it had to be BASIC for retro reasons. But it says classic BASIC tends to make users write spaghetti code, while PASCAL teaches them structured programming. I took a look into your book. The SETUP chapter and the body text in chapters 2 to 4 are written in Latin and have nothing to do with computers and programming.I'm assuming it's only a stub and will be replaced later by real programming text.

  • @OpenGL4ever

    @OpenGL4ever

    Жыл бұрын

    @@digitaljestin One more Question. Does the Commander X16 support Unicode? I doubt it, but it would be a good feature.

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    @@OpenGL4ever It's PETSCII, but you absolutely have the ability to substitute your own character set, so I suppose the answer is "yes" in a round about way. Don't even think about it as a character set, but rather as 8x8 graphical tiles that are burned into the ROM and have some convenient kernal routines for placing into VRAM. I don't think the limited ROM space could handle the full Unicode standard.

  • @OpenGL4ever

    @OpenGL4ever

    Жыл бұрын

    @@digitaljestin Thank you for the information.

  • @miselzivanovic2181
    @miselzivanovic218111 ай бұрын

    Thanx for showing codex environment and how to use it I tried it some time ago and gave up very quickly... Unfortunately, i still think codex and i won't be friends. I hope BASIC Editor will be more user friendly, no lines and have a compiler. Last environment i tried was v38...

  • @digitaljestin

    @digitaljestin

    11 ай бұрын

    There will still probably be line numbers, but there's a new REN command that renumbers an entire program. That should help quite a bit. There's still a lot of talk of an optimizing BASIC compiler, and I think it's going to happen. A lot of recent discussion has been around developing on the system, including things like C compilers. It's going to be fun to see which things get made and watch it happen!

  • @miselzivanovic2181

    @miselzivanovic2181

    11 ай бұрын

    @@digitaljestin Thanks for replying. Just checked and saw that version 43 is available. I have to try it later. My first computer was C128 and it also offered a possibility to renumber lines, but i later switched to A500 and BASIC there offered no lines. I somehow got used to that... Anyway, could be that codex in its final version is going to be more flexible. It's just odd to see no cursor, not being able to move around. Then being unable to type commands directly, instead of into a separate window (line)... It's somehow all strange and difficult to communicate with (but can be that i am the only one. (No need to change anything then 🤫) Well, it's not finished yet, all work in progress. Let's hope for the best...

  • @digitaljestin

    @digitaljestin

    11 ай бұрын

    @@miselzivanovic2181 That's actually the problem...it's not a work in progress. Nobody is fixing it up to my knowledge. The original developer created it and then walked away after slicing it up to fit into a single ROM bank. In my opinion, it's half finished, and needs some work if we want to consider it shippable.

  • @willibald-nq1dz
    @willibald-nq1dz Жыл бұрын

    BRA is 65C02, BEQ would be more retro.

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    I'm using a few op codes only available in 65C02, I believe. The point isn't to be retro, but to show off the X16 a little. And the X16 has a 65C02.

  • @BobSellers6502
    @BobSellers6502 Жыл бұрын

    Heh. CODEX needs some documentation. How do I set a breakpoint? I tried to use the BRK instruction, and that almost... sorta... did something... but nothing useful. I also can't load what I save. It seems to save, but says "Cannot load DBG information" or somesuch.

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    There are some docs (sorry, I don't have the link handy), but they aren't great. They are also outdated. CodeX had to be sliced and diced into a plugin architecture in order to fit into a ROM bank. Unfortunately, this means a lot of functionality is missing unless you have those plugin files on the root of the SD card. I was kinda hoping this video would draw attention to these problems, and motivate a fix or two :)

  • @BobSellers6502

    @BobSellers6502

    Жыл бұрын

    @@digitaljestin LOL. This explains why you glossed over the entire right hand side of the screen. And here I thought I would just swoop in, write some quick code to add some numbers, then step through it and show the results in watchpoints on the right. Well, the watchpoints work. Yeah, it needs some fixes! Riddle me this: Why use "ROM Banks" when you have a giant SDCard ready to stuff with apps? Yeah, yeah... I know, to get that "1980's experience." I was an adult in the 1980's, the computing experience wasn't that great, trust me. Well! It is what it is. I guess I'll look at the codex code some more, see if I can at least find where the program starts.

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    @@BobSellers6502 yep, you guessed it. I think the idea behind the ROM bank is that it's always there. People may switch out SD cards all the time, so there's no guarantee on what's there. The Gen2 looks like it is going to be very cartridge focused, so it might make even more sense to ignore the SD card.

  • @680x0
    @680x0 Жыл бұрын

    Is CODEX built into the latest version of the emulator? I mean, I suppose with the emulator, I can edit & assemble code outside and then just load the program when starting the emulator... but it seems like a fun way to try things out.

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    It's in the r42 ROM, which should come with the r42 emulator. You should just be able to follow along with the video if you like.

  • @DailyCorvid
    @DailyCorvid Жыл бұрын

    So cool. I can't wait to get my hands on one of these. I am learning or relearning BASIC on the BBC model B and the Commodore 64 .... By the time the CX16 hits I shall be able to create biological humans in BASIC code. It's going to be so 1982 :) Oh yeah.

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    Better get started on that weird science stuff...the first dev boards are already in the wild! If you haven't seen the new BASIC statements for audio, you're in for a treat! Although this video is about assembly, BASIC is going to a viable option for complex games on the X16.

  • @DailyCorvid

    @DailyCorvid

    Жыл бұрын

    @@digitaljestin I have seen no more than the 8BitGuy videos reveal, as I do not have a devboard. I'm sure it will be amazing though. I mean I was never one for complaining about BASIC being slow I always found it fine :)

  • @xlar54
    @xlar543 ай бұрын

    Tried using it, but I cant shake not being able to just type what i want, where I want. I accidentally deleted all my lines, and now I cant add new ones. Not sure this one is for me.

  • @digitaljestin

    @digitaljestin

    3 ай бұрын

    Honestly, it's not for me either. I made this video because I spent an hour or two figuring it out, and figured that I should give everyone a demo so they didn't have to. I've actually argued to remove CODEX from the X16 ROM, due to it requiring files loaded from SD in order to bring in all the features. That's fine for a program loaded from SD, but not one that ships on the ROM.

  • @AlexeyFilippenkoPlummet
    @AlexeyFilippenkoPlummet Жыл бұрын

    It's so obvious why assembly wasn't the language that loads at boot. My brain hurts from just looking at it - I can name commands but I have no idea why they work lol

  • @digitaljestin

    @digitaljestin

    Жыл бұрын

    Assembly really isn't an environment to boot into. Being a higher level language, BASIC works not only as a programming language, but can also serve as a set of operating system commands. Assembly, on the other hand, is just a human readable representation of a processor's instruction set. Any interpretation of a single instruction from an interface would require far more instructions just to execute it. That would make no sense.

Келесі