2 pointsby harel17 hours ago1 comment
  • jll2916 hours ago
    Enjoy coding!

    Real coding on 8-bit machines was a bit more scary than using QEMU since you had to remember to save your assebly sources after each edit, as running your machine code often crashed the machine.

    You may want to also use:

      (global-set-key [(C-f5)] 'compile)
      (global-set-key [(f5)] 'recompile)
    
    in your .[x]emacs file to save pressing M-x M-c or ESC + 'x' + 'compile' + ENTER (4-10 keys) to run make/compile with 1 keystroke instead.

    Popular execises for beginners on the C64 were:

    - write a loop that reads from A000 to C000 and writes to the same address. This seemingly useless exercise makes a copy of the CBM BASIC from ROM to RAM (the C64 has addresses multiple times in parallel "banks"), in order to subsequently edit the appearance of the characters (screen font) or to rename BASIC keywords.

    - jump to a subroutine ("SYS" in BASIC) or write code to jump ("JSR"/"JMP") to an arbitrary address, and then discover why the machine behaves as it does when you do so, by reading the RAM or ROM code located there with a disassembler or HEX monitor (try "SYS 64738" versus "SYS 4222").

    • harela minute ago
      Thanks for those tips. I used to code on a vic20 but only in basic. Assembly seemed like dark arts. I hope to correct that sentiment.