mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-31 10:08:05 +11:00
7001446212
Recipes contain bits and pieces of hardware-related knowledge, but these bits feel sparse. I've been wanting to consolidate hardware- related documentation for a while, but always fell at odds with the recipes organisation. We don't have recipes anymore, just a /doc/hw section that contains hardware-related documentation which often translate to precise instructions to run Collapse OS on a specific machine. With this new organisation, I hope to end up with a better, more solid documentation.
16 lines
505 B
Plaintext
16 lines
505 B
Plaintext
BEGIN,
|
|
A 0xff LDri, (HL) A LDrr, ( default mask )
|
|
L1 BSET ( loop2 ) @GET, @PUT,
|
|
0x20 CPi, JRZ, L4 FWR ( escapechar )
|
|
( not an escape char, just apply the mask and write )
|
|
(HL) ANDr, (HL) A LDrr,
|
|
HL INCd,
|
|
JR, AGAIN,
|
|
L4 FSET ( escapechar, adjust by setting (hl) to 0x7f )
|
|
7 (HL) RES, JR, L1 BWR ( loop2 )
|
|
L2 FSET ( maybeerror, was it an error? )
|
|
A ORr, JRZ, L1 BWR ( loop2, not an error )
|
|
L3 FSET ( error )
|
|
C A LDrr, ( error code from @GET/@PUT )
|
|
A 0x1a LDri, ( @ERROR ) 0x28 RST, RET,
|