Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/15/01 18:14
Read: times


 
#15700 - RE: loops
I would do it like this, just to be ornery. The user is required to type in a * or face the consequences.

mov r3,#1
mov a,#'?'
lcall rsput
again:
lcall rsget
cjne a,#'*',bad
mov r0,acc
mov acc,r3
mov r1,acc
outer:
mov a,#12
lcall rsput
mov a,r3
mov r2,acc
loop:lcall rsput
djnz r2,loop
mov a,#13
lcall rsput
mov a,#10
lcall rsput
djnz r1,outer
inc r3
sjmp again
bad:
mov a,#7
lcall rsput
sjmp bad



List of 5 messages in thread
TopicAuthorDate
loops            01/01/70 00:00      
RE: loops            01/01/70 00:00      
RE: loops            01/01/70 00:00      
RE: loops            01/01/70 00:00      
RE: loops            01/01/70 00:00      

Back to Subject List