Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- remain2: .EQUATE 2 ;Stack addresses while executing a
- outYet2: .EQUATE 4 ; subroutine are greater by two because
- place2: .EQUATE 6 ; the retAddr is on the stack
- ;
- divide: LDWA remain2,s ;A <- remainder
- LDWX 0,i ;X <- 0
- divLoop: SUBA place2,s ;Division by repeated subtraction
- BRLT writeNum ;If remainder is negative then done
- ADDX 1,i ;X <- X + 1
- STWA remain2,s ;Store the new remainder
- BR divLoop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement