ExtendedFuck: Porovnání verzí

Z ZděchovNET
Skočit na navigaci Skočit na vyhledávání
(Založena nová stránka s textem „Is Brainfuck extension with new commands. All commands are single symbol without parameters. {| class="wikitable" |+ Base commands ! Character ! Name ! Me…“)
 
Bez shrnutí editace
 
Řádek 7: Řádek 7:
! Meaning
! Meaning
|-
|-
! colspan="2"| Base
! colspan="3"| Base
|-
|-
| style="text-align:center"| <code>></code>
| style="text-align:center"| <code>></code>
Řádek 41: Řádek 41:
| Jump back to the command after the corresponding <code>[</code> if the byte at the pointer is nonzero.
| Jump back to the command after the corresponding <code>[</code> if the byte at the pointer is nonzero.
|-
|-
! colspan="2"| General
! colspan="3"| General
|-
|-
| style="text-align:center"| <code>=</code>
| style="text-align:center"| <code>=</code>
Řádek 51: Řádek 51:
| Ends program execution
| Ends program execution
|-
|-
| style="text-align:center"| <code>$</code>
| style="text-align:center"| <code>Ω</code>
| LOAD
| LOAD
| Load the byte at the pointer to storage
| Load the byte at the pointer to storage
|-
|-
| style="text-align:center"| <code>!</code>
| style="text-align:center"| <code>©</code>
| STORE
| STORE
| Save storage to the byte at the pointer
| Save storage to the byte at the pointer
|-
|-
! colspan="2"| Subroutines
! colspan="3"| Subroutines
|-
|-
| style="text-align:center"| <code>:</code>
| style="text-align:center"| <code>:</code>
Řádek 69: Řádek 69:
| Jump to label
| Jump to label
|-
|-
| style="text-align:center"| <code>$</code>
| style="text-align:center"| <code>!</code>
| CALL
| CALL
| Call subroutine given by label matching current cell value
| Call subroutine given by label matching current cell value
Řádek 77: Řádek 77:
| Return from subroutine
| Return from subroutine
|-
|-
| colspan="2"| Arithmetic operations
! colspan="3"| Arithmetic operations
|-
| style="text-align:center"| <code>*</code>
| MUL
| '''Multiplies''' the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
|-
| style="text-align:center"| <code>/</code>
| DIV
| '''Divides''' the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
|-
|-
| style="text-align:center"| <code>§</code>
| style="text-align:center"| <code>§</code>
Řádek 94: Řádek 86:
| SUB
| SUB
| '''Subtracts''' the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
| '''Subtracts''' the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
|-
| style="text-align:center"| <code>*</code>
| MUL
| '''Multiplies''' the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
|-
| style="text-align:center"| <code>/</code>
| DIV
| '''Divides''' the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
|-
|-
| style="text-align:center"| <code>%</code>
| style="text-align:center"| <code>%</code>
Řádek 99: Řádek 99:
| Preforms a '''Modulo''' operation on the byte at the pointer and the byte in storage, storing its result in the byte at the pointer.
| Preforms a '''Modulo''' operation on the byte at the pointer and the byte in storage, storing its result in the byte at the pointer.
|-
|-
! colspan="2"| Bitwise operations
! colspan="3"| Bitwise operations
|-
|-
| style="text-align:center"|<code>}</code>
| style="text-align:center"|<code>}</code>

Aktuální verze z 27. 2. 2020, 07:07

Is Brainfuck extension with new commands. All commands are single symbol without parameters.

Base commands
Character Name Meaning
Base
> RIGHT Increment the pointer (to point to the next cell to the right).
< LEFT Decrement the pointer (to point to the next cell to the left).
+ INC Increment (increase by one) the byte at the pointer.
- DEC Decrement (decrease by one) the byte at the pointer.
. OUT Output the value of the byte at the pointer.
, IN Accept one byte of input, storing its value in the byte at the pointer.
[ JUMPZ Jump forward to the command after the corresponding ] if the byte at the pointer is zero.
] JUMPNZ Jump back to the command after the corresponding [ if the byte at the pointer is nonzero.
General
= SET Set the byte at the pointer to zero
@ HALT Ends program execution
Ω LOAD Load the byte at the pointer to storage
© STORE Save storage to the byte at the pointer
Subroutines
: LABEL Define procedure using current cell value as label
° JUMP Jump to label
! CALL Call subroutine given by label matching current cell value
? RET Return from subroutine
Arithmetic operations
§ ADD Adds the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
ø SUB Subtracts the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
* MUL Multiplies the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
/ DIV Divides the byte at the pointer with the byte in storage, storing its result in the byte at the pointer.
% MOD Preforms a Modulo operation on the byte at the pointer and the byte in storage, storing its result in the byte at the pointer.
Bitwise operations
} SHR Performs a single right logical shift of the byte at the pointer.
{ SHL Performs a single left logical shift of the byte at the pointer.
~ NOT Performs a bitwise NOT operation on the byte at the pointer (all 1's and 0's are swapped).
^ XOR Performs a bitwise XOR operation on the byte at the pointer and the byte in storage, storing its result in the byte at the pointer.
& AND Performs a bitwise AND operation on the byte at the pointer and the byte in storage, storing its result in the byte at the pointer.
| OR Performs a bitwise OR operation on the byte at the pointer and the byte in storage, storing its result in the byte at the pointer.