;;; -*- Mode: asm; indent-tabs-mode: t; tab-width: 8 -*- ;; Sets memory in A to all addresses from B_start to B_end ;; Modifies A, X and B_start .proc memset .include "mem.inc" ;;put what to recursive write in Y. LDX #$0 TAY loop: ;;write to byte TYA STA (>B_start ,X) Add_16 >B_start, B_start CMP >B_end BEQ test jmp loop test: LDA B_start, X) RTS .endproc