Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'all programs start with
- OPTION STRICT
- VAR A#
- VAR B#
- VAR R#
- VAR I%
- 'the following lines are per-instruction
- i: INC A#
- d: DEC A#
- s: A#=A#*A#
- p: ?A#
- P: ?CHR$(A# AND &HFFFF)
- x: A#=ABS(A#)
- >: A#=R#
- a: INC B#
- k: DEC B#
- m: B#=B#*B#
- o: ?B#
- O: ?CHR$(B# AND &HFFFF)
- 0: B#=ABS(B#)
- <: B#=R#
- +: R#=A#+B#
- -: R#=A#-B#
- *: R#=A#*B#
- /: R#=A#/B#
- ^: R#=POW(A#,B#)
- w: ?R#
- u: if statement condition A#>B#
- U: if statement condition A#<B#
- =: if statement condition A#==B#
- (: start an if statement body
- ): end an if statement body
- |: set loop as WHILE A#>B#
- _: set loop as WHILE A#<B#
- \: set loop as WHILE A#==B#
- f: set loop as FOR I%=1 TO FLOOR(A#)
- F: set loop as FOR I%=1 TO FLOOR(B#)
- {: WHILE #TRUE
- }: WEND
- [: open marked loop
- ]: close marked loop
- ': LINPUT "";S$:R#=ASC(S$[0])
- ": INPUT "",R#
- r: A#=0:B#=0:R#=0
- @: A#=0
- #: B#=0
- e: R#=0
- $: toggle comment
- ~: line comment (')
- `: ignore next character
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement