Added `syntax_highlighting/` folder and instructions for vim and neatvi.
[vvhitespace] / stdlib_tests / 6009_printf_substitutedstackstring.pvvs
CommitLineData
08a3a286
AT
1@ First setup a string on the heap for use as a substitution.
2A"test"
3SSSTSSSSSN | PUSH 32 (address)
4SSSTSSN | PUSH 4 (count)
5NSTTTTTTN | JSR > 11111 (spew)
6
7@ Now prepare arguments and call printf.
8A"%c%s%d%u%i"
9SSSTSTSTSN | PUSH +42
10SSSTSTSTSN | PUSH +42
11SSSTN | PUSH +1
12SSSTSSSSSN | PUSH +32 (address)
13SSSTSSSSSTN | PUSH ASCII 'A'
14SSSTSTN | PUSH 5 (number of substitutions)
15NSTTSSSN | JSR > 1000 (printf)
16
17NNN | DIE
18
19#include <heap.pvvs>
20#include <stdio.pvvs>