This is SAL (Scratch Assembly Language) 1.5. What you type goes into Input, and the variable goes to Output. Opcodes: LOD: loads the number you put in (up to 3 digits!) after this (LOD 5 (at 1) - sets variable to 5) ADD: adds the number you put in after this to the loaded number, this then becomes the loaded number (ADD 20 (at 2) - sets variable to itself + 20, variable is now 25) SUB: same as ADD but subtracting (SUB 15 (at 3) - sets variable to itself - 15, variable is now 10) JMP - sets the number to read to the number you put in (JMP 2 (at 4) - goes to the opcode at position 2, which would be ADD 20. Then, it infinitely loops, this is what it was originally supposed to do.) TXT - prints the characters, supports up to 10 characters (TXT HELLO! (at 5) - puts HELLO! in the Output) RND - prints a random thing within your range (the first number HAS to have 3 digits!!) (RND 001 200 (at 6) - Generates a number between 1 and 200, variable is now that number) SND - Plays a 1 KHz beep at the volume of the number you put in (SND 50 (at 7) - Plays a beep at 50% volume) RUN - Runs the code (no argument, no small tutorial!)
notes: Try this: LOD 20 (then press enter) ADD 1 (press enter) SND 100 (press enter) TXT INF LOOP (press enter) JMP 2 (press enter) RUN (enter) This should start with 20, then add 1, then say INF LOOP over and over again. OR try this: RND 001 20 (then press enter) ADD 1 (press enter) SND (press enter) TXT INF LOOP (press enter) JMP 2 (press enter) RUN (enter) This should start with a random number between 1 and 20, then add 1, then play a sound at full volume, then say INF LOOP over and over again. credits: err.. my brain..? and.. ..kathleen booth?? definitely credits to u/realspiritsk from reddit!! helped me fix the jmp problem that killed everything right before version 1.1 1.0 - released with load, add, sub, jump, and run. 1.1 - added "txt", which can print up to 10 characters, and renamed load and jump to lod and jmp. 1.2 - made it easier to read by adding some blank lines, since the ask popup is blocking some of the code. 1.3 - added "rnd", which generates a random number. 1.4 - added "snd", which plays a tone. 1.5 - added volume! pitch maybe next update.