From a35163c4333ab0ec661bd59f6f61ff7ba38cc0b6 Mon Sep 17 00:00:00 2001 From: Luxferre Date: Wed, 30 Apr 2025 11:09:34 +0300 Subject: [PATCH] Updated the readme regarding the new mechanics --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 988b39d..101a7f8 100644 --- a/README.md +++ b/README.md @@ -472,10 +472,9 @@ are using it in case the target platform allows them to. ### How to do simple addition and simple multiplication, given only the FMA? It might seem inconvenient at first, but the FMA operation is quite capable. -First off, you already have a constant 0 always stored in 0, but it's advisable -to store a constant 1 into some unused location, like 99. You can do this e.g. -with the `set 1 0 99` operation. Then, let's go with three cases (assuming we -have stored 1 into the data memory location 99): +Remember that you already have a constant 0 always stored at the location 0 and +a constant 1 stored at the location 127. This will allow you to do any addition +and multiplication combo separately even without the shortcut mnemonics: 1. Incrementing a memory location is as easy as `fma 127 127 [loc]`. 2. Adding two numbers at loc1 and loc2 into loc2: `fma [loc1] 127 [loc2]`.