repos / gbc

GBC - Go B Compiler
git clone https://github.com/xplshn/gbc.git

gbc / tests
xplshn  ·  2025-08-13

multiple-postfix.b

B
 1main() {
 2    extrn printf, malloc;
 3    auto arr, W;
 4    W = &0[1];
 5
 6    arr    = malloc(2 * W);
 7    arr[0] = malloc(2 * W);
 8    arr[1] = malloc(2 * W);
 9    arr[0][0] = 34;
10    arr[0][1] = 35;
11    arr[1][0] = 69;
12    arr[1][1] = 420;
13
14    arr[1][0]++;
15    --arr[1][1];
16
17    printf("%d  %d\n%d %d\n",
18           arr[0][0],
19           arr[0][1],
20           arr[1][0],
21           arr[1][1]);
22}