Core War/Dwarf

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Dwarf is a simple yet classic warrior. This program "bombs" the core at regularly space locations with DATs, at the same time making sure it doesn't hit itself.

        ADD #4, 3        ; execution begins here
        MOV 2, @2
        JMP -2
        DAT #0, #0