TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Commodore 64 Assembly

3 pointsby harel19 days ago

1 comment

jll2919 days ago
Enjoy coding!<p>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.<p>You may want to also use:<p><pre><code> (global-set-key [(C-f5)] &#x27;compile) (global-set-key [(f5)] &#x27;recompile) </code></pre> in your .[x]emacs file to save pressing M-x M-c or ESC + &#x27;x&#x27; + &#x27;compile&#x27; + ENTER (4-10 keys) to run make&#x2F;compile with 1 keystroke instead.<p>Popular execises for beginners on the C64 were:<p>- 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 &quot;banks&quot;), in order to subsequently edit the appearance of the characters (screen font) or to rename BASIC keywords.<p>- jump to a subroutine (&quot;SYS&quot; in BASIC) or write code to jump (&quot;JSR&quot;&#x2F;&quot;JMP&quot;) 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 &quot;SYS 64738&quot; versus &quot;SYS 4222&quot;).
评论 #43802388 未加载