Skip to content
Tactiverge
Level 3Program correctnessWrite a program

Count up to n

Read n. Output 1, 2, …, n in order, then halt. If n is 0, output nothing.

Public tests

  • input 3 → 1, 2, 3
  • input 0 → no output
  • input 1 → 1
  • input 6 → 1, 2, 3, 4, 5, 6

Par: 576 cycles in total over these tests. Skills: loops, counters, JZ.

New to this? Silicon Studio 15: A simple virtual processor

How results are computed: model assumptions.

One instruction per line. Labels end with a colon, comments start with a semicolon. Numbers can be 12, 0x0C or 0b1100.