53 lines
394 B
Plaintext
53 lines
394 B
Plaintext
|
@ 0
|
||
|
args 0
|
||
|
size
|
||
|
#exec std/string/array/rev.lb
|
||
|
|#insert push
|
||
|
#insert swap
|
||
|
#insert |jmp
|
||
|
size
|
||
|
|
||
|
; |
|
||
|
; 'T
|
||
|
; 'e
|
||
|
; 's
|
||
|
; 't
|
||
|
; 4
|
||
|
; >
|
||
|
|
||
|
|
||
|
; |size string[size]> (size)
|
||
|
push 0
|
||
|
@ 1
|
||
|
; |index...> (size)
|
||
|
|
||
|
dup
|
||
|
|
||
|
push 2
|
||
|
jmp 255
|
||
|
@ 2
|
||
|
|
||
|
; |size index index...> (size)
|
||
|
sub
|
||
|
jz 254
|
||
|
|
||
|
; |index...> (size)
|
||
|
|
||
|
push 3
|
||
|
jmp 255
|
||
|
@ 3
|
||
|
|
||
|
#expr +
|
||
|
; |size-1 index...>
|
||
|
pick
|
||
|
|
||
|
swap
|
||
|
|
||
|
#expr +
|
||
|
jmp 1
|
||
|
|
||
|
@ 254
|
||
|
quit
|
||
|
|
||
|
@ 255
|