2013-12-13 21:24:03 +00:00
|
|
|
.ifndef COMMON__I__
|
2013-12-27 13:57:56 +00:00
|
|
|
|
2013-12-13 21:24:03 +00:00
|
|
|
COMMON__I__ = 1
|
2013-12-27 13:57:56 +00:00
|
|
|
|
2013-12-13 21:24:03 +00:00
|
|
|
; load A/X macro
|
2013-12-27 13:57:56 +00:00
|
|
|
.macro ldax arg
|
|
|
|
.if (.match (.left (1, arg), #)) ; immediate mode
|
|
|
|
lda #<(.right (.tcount (arg)-1, arg))
|
|
|
|
ldx #>(.right (.tcount (arg)-1, arg))
|
|
|
|
.else ; assume absolute or zero page
|
|
|
|
lda arg
|
|
|
|
ldx 1+(arg)
|
|
|
|
.endif
|
|
|
|
.endmacro
|
2013-12-13 21:24:03 +00:00
|
|
|
|
|
|
|
; store A/X macro
|
2013-12-27 13:57:56 +00:00
|
|
|
.macro stax arg
|
|
|
|
sta arg
|
|
|
|
stx 1+(arg)
|
|
|
|
.endmacro
|
2013-12-13 21:24:03 +00:00
|
|
|
|
2013-12-27 13:57:56 +00:00
|
|
|
; load A/Y macro
|
|
|
|
.macro lday arg
|
|
|
|
.if (.match (.left (1, arg), #)) ; immediate mode
|
|
|
|
lda #<(.right (.tcount (arg)-1, arg))
|
|
|
|
ldy #>(.right (.tcount (arg)-1, arg))
|
|
|
|
.else ; assume absolute or zero page
|
|
|
|
lda arg
|
|
|
|
ldy 1+(arg)
|
|
|
|
.endif
|
|
|
|
.endmacro
|
2013-12-13 21:24:03 +00:00
|
|
|
|
|
|
|
.macro phax
|
|
|
|
pha
|
|
|
|
txa
|
|
|
|
pha
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
.macro plax
|
|
|
|
pla
|
|
|
|
tax
|
|
|
|
pla
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
2013-12-27 13:57:56 +00:00
|
|
|
|
|
|
|
; -- LICENSE FOR common.i --
|
2013-12-13 21:24:03 +00:00
|
|
|
; The contents of this file are subject to the Mozilla Public License
|
|
|
|
; Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
; compliance with the License. You may obtain a copy of the License at
|
|
|
|
; http://www.mozilla.org/MPL/
|
2013-12-27 13:57:56 +00:00
|
|
|
;
|
2013-12-13 21:24:03 +00:00
|
|
|
; Software distributed under the License is distributed on an "AS IS"
|
|
|
|
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
; License for the specific language governing rights and limitations
|
|
|
|
; under the License.
|
2013-12-27 13:57:56 +00:00
|
|
|
;
|
2013-12-13 21:24:03 +00:00
|
|
|
; The Original Code is ip65.
|
2013-12-27 13:57:56 +00:00
|
|
|
;
|
2013-12-13 21:24:03 +00:00
|
|
|
; The Initial Developer of the Original Code is Per Olofsson,
|
|
|
|
; MagerValp@gmail.com.
|
|
|
|
; Portions created by the Initial Developer are Copyright (C) 2009
|
2013-12-27 13:57:56 +00:00
|
|
|
; Per Olofsson. All Rights Reserved.
|
2013-12-13 21:24:03 +00:00
|
|
|
; -- LICENSE END --
|