-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds MSET statement to clear/set memory areas.
- Loading branch information
Showing
5 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
; | ||
; FastBasic - Fast basic interpreter for the Atari 8-bit computers | ||
; Copyright (C) 2017,2018 Daniel Serpell | ||
; | ||
; This program is free software; you can redistribute it and/or modify | ||
; it under the terms of the GNU General Public License as published by | ||
; the Free Software Foundation, either version 2 of the License, or | ||
; (at your option) any later version. | ||
; | ||
; This program is distributed in the hope that it will be useful, | ||
; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
; GNU General Public License for more details. | ||
; | ||
; You should have received a copy of the GNU General Public License along | ||
; with this program. If not, see <http://www.gnu.org/licenses/> | ||
; | ||
; In addition to the permissions in the GNU General Public License, the | ||
; authors give you unlimited permission to link the compiled version of | ||
; this file into combinations with other programs, and to distribute those | ||
; combinations without any restriction coming from the use of this file. | ||
; (The General Public License restrictions do apply in other respects; for | ||
; example, they cover modification of the file, and distribution when not | ||
; linked into a combine executable.) | ||
|
||
|
||
; MSET: sets a range of memory to a value | ||
; --------------------------------------- | ||
|
||
; From interpreter.asm | ||
.import stack_l, stack_h, pop_stack_3 | ||
.import mem_set | ||
.importzp tmp1, tmp2 | ||
|
||
.include "atari.inc" | ||
|
||
.segment "RUNTIME" | ||
|
||
.proc EXE_MSET | ||
pha ; Store value to set into stack | ||
|
||
lda stack_l, y | ||
sta tmp1 | ||
ldx stack_h, y | ||
|
||
lda stack_l+1, y | ||
sta tmp2 | ||
lda stack_h+1, y | ||
sta tmp2+1 | ||
|
||
pla ; Recover value to set into Y | ||
tay | ||
jsr mem_set | ||
|
||
jmp pop_stack_3 | ||
.endproc | ||
|
||
.include "../deftok.inc" | ||
deftoken "MSET" | ||
|
||
; vi:syntax=asm_ca65 |