mirror of
https://github.com/chancehudson/circom-stark.git
synced 2026-01-09 22:08:00 -05:00
17 lines
352 B
NASM
17 lines
352 B
NASM
; a simple repeated squaring program
|
|
set 0x0 100
|
|
; calculate 100^4
|
|
mul 0x1 0x0 0x0
|
|
mul 0x1 0x0 0x1
|
|
mul 0x1 0x0 0x1
|
|
; make a public signal and assert its expected value
|
|
out 0x1 100000000
|
|
; now calculate 200^4
|
|
set 0x0 200
|
|
mul 0x1 0x0 0x0
|
|
mul 0x1 0x0 0x1
|
|
mul 0x1 0x0 0x1
|
|
; and output
|
|
out 0x1 1600000000
|
|
; registers can be reused after an output is marked
|