optimize Mult and Fill assembly

This commit is contained in:
2021-12-07 21:48:15 +05:30
parent 04b283ccec
commit 6033b21c49
2 changed files with 14 additions and 37 deletions

View File

@@ -29,11 +29,6 @@ M=D
@itr
M=0
// black if pix = -1
// white if pix = 0
@pix
M=-1
// loop declaration
// D = reg - itr
// if 0 jump to @END
@@ -72,33 +67,30 @@ M=M+1
// clear the screen if no key pressed:
// pix = 0
// itr = 0
// addr = 16384
// back to loop declaration
(CLEAR)
@pix
M=0
@itr
M=0
@SCREEN
D=A
@addr
M=D
@LOOP
0;JMP
// paint the screen if no key pressed:
// pix = -1
// itr = 0
// addr = 16384
// back to loop declaration
(PAINT)
@pix
M=-1
@LOOP
0;JMP
// main feedback loop
// itr = 0
// addr = 16384
// jump to @CLEAR if no key pressed
// jump to @PAINT if any key pressed
(END)
@itr
M=0
@@ -107,13 +99,6 @@ D=A
@addr
M=D
@LOOP
0;JMP
// main feedback loop
// jump to @CLEAR if no key pressed
// jump to @PAINT if any key pressed
(END)
@KBD
D=M
@CLEAR