So my code is kinda big with 115 instructions
Code: Select all
88*8*8*8*8*8*8*8*8*0<1^:1+93+?0<1^-0>12>3g02>1<1^:1+93+?1<1^-1>13>3g03>2<3<:7?4<1^+4>21^:8?2/99+1+c0<1<:6?4<1+4>4<p
Code: Select all
preserve 2
var divisor 1073741824
var result
start:
push [0]
push divisor
jl skip_sub
sub [0],divisor
mov [2],1
jmp second_number
skip_sub:
mov [2],0
second_number:
push [1]
push divisor
jl skip_sub2:
sub [1],divisor
mov [3],1
jmp numbers_done
skip_sub2:
mov [3],0
numbers_done:
push [2]
push [3]
je dont_add
add result,divisor
dont_add:
push 2
push divisor
je last_one
div divisor,2
jmp start
last_one:
push [0]
push [1]
je nothing
add result,1
nothing:
pi result