Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem Declare variables
- float C 'Restore the result in here
- float Squared 'Number in here gets squared in SquareVar routine
- float A = 25
- float B = 15
- let Squared = A 'Square A first
- Gosub SquareVar
- let C = Squared 'store squared result in C
- mov Squared, B 'now square B
- Gosub SquareVar
- Add C, Squared 'Add squared value of B to that of A
- Sqrt C 'Square root to get final answer
- goto NotSquareVar
- retAddr:
- BIOS.End()
- SquareVar: 'Sqaures value in variable Squared
- mul Squared, Squared
- return
- NotSquareVar:
- goto retAddr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement