Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test start 1000
- lda two
- counter sta beta
- loop lda alpha
- div beta
- mul beta
- sta remain
- lda alpha
- sub remain
- comp zero
- jeq np
- lda beta
- add one
- comp alpha
- jlt counter
- jeq p
- p ldx zero
- wploop td outdev
- jeq wploop
- ldch prime,x
- wd outdev
- tix five
- jlt wploop
- j END
- np ldx zero
- wnploop td outdev
- jeq wnploop
- ldch notprime,x
- wd outdev
- tix nine
- jlt wnploop
- j END
- zero word 0
- one word 1
- two word 2
- three word 3
- five word 5
- nine word 9
- alpha word 5
- beta resw 1
- remain resw 1
- outdev byte x'05'
- prime byte c'prime'
- notprime byte c'not prime'
- END end test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement