aboutsummaryrefslogtreecommitdiff
path: root/test.asm
blob: 09629567161fee24e0cd86b9448c50229de53f75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  malloc.byte 3
  mov.word 0
  push.reg.word 0
  push.byte 'a'
  mset.byte 0
  push.reg.word 0
  push.byte 'b'
  mset.byte 1
  push.reg.word 0
  push.byte 'c'
  mset.byte 2

  push.reg.word 0
  msize
  malloc.stack.byte
  mov.word 1
  push.word 0
  mov.word 2
  push.reg.word 0
  push.reg.word 2
  push.word 1
  push.reg.word 0
  msize
  sub.word
  sub.word
  mget.stack.byte
  mov.byte 24
  push.reg.word 1
  push.reg.byte 24
  push.reg.word 2
  mset.stack.byte
  push.reg.word 2
  push.word 1
  plus.word
  mov.word 2
  push.reg.word 2
  push.reg.word 0
  msize
  eq.word
  not.byte
  jump.if.byte 17
  halt