Prev: C3E4 Up: Map Next: C415
C403: Set The Printer Motor Speed Via Port FB
Used by the routine at C3E4.
The game's copy of the ROM COPY_LINE code: writes 02 to port FB when the count in B is below three (slowing the printer motor for the last two pixel lines), and 00 otherwise, then waits until a read from that port comes back negative.
SetPrinterMotorSpeed C403 LD A,B Compare B with 03 and leave FF in A when the count is below.
C404 CP $03
C406 SBC A,A
C407 AND %00000010 Keep just bit 1, giving 02 (slow the printer motor) when the count is below three and 00 otherwise.
C409 OUT ($FB),A Send that strobe to the ZX Printer on port FB.
C40B LD D,A Keep the motor value just sent in D.
SetPrinterMotorSpeed_0 C40C IN A,($FB) Read port FB and return if the ZX Printer is busy.
C40E ADD A,A
C40F RET M
C410 JR NC,SetPrinterMotorSpeed_0 Go back to SetPrinterMotorSpeed_0 while the ZX Printer is not ready.
C412 JP $0F12 Jump to COPY_LINE at 0F12.
Prev: C3E4 Up: Map Next: C415