Advertisement
Ham62

Jump Test.RBS

Jan 29th, 2018
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. rem Declare variables
  2. float C 'Restore the result in here
  3. float Squared 'Number in here gets squared in SquareVar routine
  4. float A = 25
  5. float B = 15
  6.  
  7. let Squared = A 'Square A first
  8. Gosub SquareVar
  9.  
  10. let C = Squared 'store squared result in C
  11.  
  12. mov Squared, B 'now square B
  13. Gosub SquareVar
  14.  
  15. Add C, Squared 'Add squared value of B to that of A
  16. Sqrt C 'Square root to get final answer
  17.  
  18. goto NotSquareVar
  19. retAddr:
  20.  
  21. BIOS.End()
  22.  
  23. SquareVar: 'Sqaures value in variable Squared
  24. mul Squared, Squared
  25. return
  26.  
  27. NotSquareVar:
  28. goto retAddr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement