You can find the hi-res drawing code in an Applesoft disassembly. HPLOT starts at $F6FE. The ROM code is optimized for size, and parts are tricky to sort out. If you want something a bit more straightforward, you can find Applesoft-ish line drawing in fdraw. Some commentary on how Applesoft's line drawing code sets bits on the hi-res screen can be found ...


The routines are documented in the Programmers Aid #1 manual https://archive.org/details/programmers-aid-1/page/n81 These are basically the same as the ones in the Applesoft ROM. They might use different zero page locations and won't handle floating point numbers but they are the same algorithms.

Only top voted, non community-wiki answers of a minimum length are eligible