pine

The pine programming language.


pine

/

examples

/

run.pn

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 43 44 45 46 47 48 49
# pine lang

mov ec 0

lbl main
  run mlt
  run div
  run mod
  ext ec

lbl mlt
  mov a 8
  psh a
  mov b 0
  pop b
  mlt a b
  psh a
  run print
  clr a
  clr b
ret

lbl div
  mov a 8
  mov b 4
  div a b
  psh a
  run print
  clr a
  clr b
ret

lbl mod
  mov a 32
  mov b 7
  mod a b
  psh a
  run print
  clr a
  clr b
ret

lbl print
  mov s 0
  pop s
  prt s
  clr s
ret

Back to Top