Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Additional commentary:

  • The value is read into "@tmp" so that I can check to see if it's zero (i.e. the end of a list)
  • The second line after "@stack_push" ("subleq @stack_push, @n_one") increments the destination address of the operation, so next time the item will be written to the next larger address
  • "@end" is when the end of the list is encountered and it copies the stack address (which happens to be at "@stack_pop+0", i.e. just "@stack_pop") to the write address of the instruction at "@stack_pop_read" (i.e. "@stack_pop_read+1")
  • That address is then decremented each time through the loop ("subleq @stack_pop_read+1, @one")
  • The zero terminator is written with the first line of "@reset" ("subleq @OUT, @zero")