Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: forgot some changes, now it should be sufficient #184

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy Miden Assembly Playground
on:
push:
branches:
- main
- dominik_forgot_some_procedures

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion examples/collatz.masm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ begin
if.true
push.3 mul push.1 add
else
push.2 u32checked_div
push.2 u32assert2 u32div
end
dup push.1 neq
end
Expand Down
2 changes: 1 addition & 1 deletion examples/comparison.masm
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ begin

# Check if final result mod 2 is 0 or 1 (numer is either even or odd)
push.2
u32checked_mod
u32assert2 u32mod
end
4 changes: 2 additions & 2 deletions examples/matrix_multiplication.masm
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ proc.matrix_multiply.0

# add the padding
# [[c, r, colC, writePtr], [words, readA, addrB, 0], acc, ...]
dup push.3 u32checked_and neq.0 while.true
dup push.3 u32assert2 u32and neq.0 while.true
push.0 movdn.7

add.1 dup push.3 u32checked_and neq.0
add.1 dup push.3 u32assert2 u32and neq.0
end

# at this point there is a complete row of C's data on the stack. push
Expand Down
4 changes: 1 addition & 3 deletions examples/standard_library.inputs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"operand_stack": [""]
}
{}
6 changes: 3 additions & 3 deletions examples/standard_library.masm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a basic program to demonstrate using modules from the standard library.
# It pushes two u64 numbers onto the stack and then adds them.
# It pushes two u64 numbers onto the stack and then checks which is bigger.
# The numbers are placed on the stack by first pushing the low limb, then the high limb.

# Import the u64 math module from the standard library.
Expand All @@ -11,6 +11,6 @@ begin
# push the low limb then the high limb. a = 4294967299
push.3.1

# a + b = 8589934595, represented by limbs c_hi = 2 and c_lo = 3
exec.u64::checked_add
# 3.1 is bigger than 0.1
exec.u64::max
end
2 changes: 1 addition & 1 deletion playground/src/components/DropDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const examples = [
'shamir_secret_share',
'collatz',
'comparison',
'matrix_multiplication',
'nprime',
'matrix_multiplication',
//'advice_provider',
//'bsearch',
];
Expand Down
Loading