From 9a86ceffb6dca6f9fb07dccdc50fc7f2c1ae2556 Mon Sep 17 00:00:00 2001 From: Dominik Schmid Date: Tue, 30 Apr 2024 21:20:57 +0200 Subject: [PATCH] fix: forgot some changes, now it should be sufficient --- .github/workflows/gh-pages.yml | 2 +- examples/collatz.masm | 2 +- examples/comparison.masm | 2 +- examples/matrix_multiplication.masm | 4 ++-- examples/standard_library.inputs | 4 +--- examples/standard_library.masm | 6 +++--- playground/src/components/DropDown.tsx | 2 +- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 05309bd..d38a751 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -3,7 +3,7 @@ name: Deploy Miden Assembly Playground on: push: branches: - - main + - dominik_forgot_some_procedures jobs: build: diff --git a/examples/collatz.masm b/examples/collatz.masm index b921de6..e16daf0 100644 --- a/examples/collatz.masm +++ b/examples/collatz.masm @@ -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 diff --git a/examples/comparison.masm b/examples/comparison.masm index 089d51c..d6393ce 100644 --- a/examples/comparison.masm +++ b/examples/comparison.masm @@ -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 \ No newline at end of file diff --git a/examples/matrix_multiplication.masm b/examples/matrix_multiplication.masm index 370ef9e..c666bf7 100644 --- a/examples/matrix_multiplication.masm +++ b/examples/matrix_multiplication.masm @@ -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 diff --git a/examples/standard_library.inputs b/examples/standard_library.inputs index f37e461..9e26dfe 100644 --- a/examples/standard_library.inputs +++ b/examples/standard_library.inputs @@ -1,3 +1 @@ -{ - "operand_stack": [""] -} \ No newline at end of file +{} \ No newline at end of file diff --git a/examples/standard_library.masm b/examples/standard_library.masm index ab11568..e5c801a 100644 --- a/examples/standard_library.masm +++ b/examples/standard_library.masm @@ -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. @@ -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 \ No newline at end of file diff --git a/playground/src/components/DropDown.tsx b/playground/src/components/DropDown.tsx index e508184..e949d4e 100644 --- a/playground/src/components/DropDown.tsx +++ b/playground/src/components/DropDown.tsx @@ -13,8 +13,8 @@ const examples = [ 'shamir_secret_share', 'collatz', 'comparison', - 'matrix_multiplication', 'nprime', + 'matrix_multiplication', //'advice_provider', //'bsearch', ];