100 doors/8086 Assembly: Difference between revisions

two less instructions
(moved from 100 doors)
 
(two less instructions)
Line 111:
;two doors and reducing the time needed
;to do the task.
and cl,cl ; Set the flags according to cl.
 
initloop:
jz dodoor ; If the counter is zero continue
;to the main loop.
mov [bx],ax ; Close two doors (write a 0000 word).
inc bx ; Increment the pointer.
inc bx
dec cl ; Decrement the counter.
jmpjnz initloop ; Loop or else fall through.
 
; ** Main
Anonymous user