Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
18
Task/Machine-code/BBC-BASIC/machine-code.bbc
Normal file
18
Task/Machine-code/BBC-BASIC/machine-code.bbc
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
REM Claim 9 bytes of memory
|
||||
SYS "GlobalAlloc",0,9 TO code%
|
||||
|
||||
REM Poke machine code into it
|
||||
P%=code%
|
||||
[OPT 0
|
||||
mov EAX, [ESP+4]
|
||||
add EAX, [ESP+8]
|
||||
ret
|
||||
]
|
||||
|
||||
REM Run code
|
||||
SYS code%,7,12 TO result%
|
||||
PRINT result%
|
||||
|
||||
REM Free memory
|
||||
SYS "GlobalFree",code%
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue