I thought it would be better to separate the procedure to paint white and the procedure to paint black. Points listed below.
- I was misunderstanding the size of screen memory
- I could not use expressions such as R0 and R1
- M[0] stores the screen state
- M[1] stores the screen memory index
- If it is in the same state as before, it ends
- I described branch processing when the value of keyboard memory (M [24576]) is 0
I am unfamiliar so I can not write repetitive processing immediately.