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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/27/07 00:01
Read: times


 
#139884 - How about this?
Responding to: ???'s previous message
I think the program as posted is buggy.
I think the following program is correct.

Am I close?

-- Russ

Quiz:
   mov   b,#16
   mul   ab
   rlc   a
   jb    p,Quiz1
   jz    Quiz2
   mov   a,#2
   sjmp  Quiz2
Quiz1:
   addc  a,#22h
   jc    Quiz2
   anl   a,#03h
   dec   a
Quiz2:
   addc  a,#0
   xch   a,b
   push  b              ; <------ add
   mov   b,#16          ; <------ add
   mul   ab             ; <------ add
   rlc   a
   jb    p,Quiz3
   jz    Quiz4
   mov   a,#2
   sjmp  Quiz4
Quiz3:
   addc  a,#22h
   jc    Quiz4
   anl   a,#03h
   dec   a
Quiz4:
   pop   b              ; <------ add
   addc  a,b
   ret



List of 16 messages in thread
TopicAuthorDate
weekend-end quiz            01/01/70 00:00      
   How about this?            01/01/70 00:00      
      @#$%^&            01/01/70 00:00      
   Two equivalent functions            01/01/70 00:00      
      OK, I admit, 2:1            01/01/70 00:00      
         Nice variation!            01/01/70 00:00      
            shortest?            01/01/70 00:00      
               Eleven bytes. No tricks.            01/01/70 00:00      
                  The wayward path followed...            01/01/70 00:00      
   Deterministic Way            01/01/70 00:00      
      Yet another tweak            01/01/70 00:00      
         OMG....            01/01/70 00:00      
            You are forgiven            01/01/70 00:00      
   commented            01/01/70 00:00      
      Nastiness density increased            01/01/70 00:00      
   That looks like my assembly code.            01/01/70 00:00      

Back to Subject List