diff --git a/desk.acc/calculator.s b/desk.acc/calculator.s index 165071a..67a277c 100644 --- a/desk.acc/calculator.s +++ b/desk.acc/calculator.s @@ -2,12 +2,12 @@ .include "apple2.inc" .include "../inc/apple2.inc" - .include "../inc/prodos.inc" - .include "../mgtk.inc" - .include "../desktop.inc" ; redraw icons after window move, font + .include "../desktop.inc" .include "../macros.inc" +;;; ============================================================ + .org $800 adjust_txtptr := $B1 diff --git a/desk.acc/date.s b/desk.acc/date.s index b12ab57..2e9c886 100644 --- a/desk.acc/date.s +++ b/desk.acc/date.s @@ -3,11 +3,12 @@ .include "apple2.inc" .include "../inc/apple2.inc" .include "../inc/prodos.inc" - .include "../mgtk.inc" - .include "../desktop.inc" ; redraw icons after window move; font; glyphs + .include "../desktop.inc" .include "../macros.inc" +;;; ============================================================ + .org $800 ;;; ============================================================ diff --git a/desk.acc/eyes.s b/desk.acc/eyes.s index 75b7a86..b4f0910 100644 --- a/desk.acc/eyes.s +++ b/desk.acc/eyes.s @@ -2,7 +2,6 @@ .include "apple2.inc" .include "../inc/apple2.inc" - .include "../inc/prodos.inc" .include "../mgtk.inc" .include "../desktop.inc" .include "../macros.inc" diff --git a/desk.acc/puzzle.s b/desk.acc/puzzle.s index 669ccdf..a6448af 100644 --- a/desk.acc/puzzle.s +++ b/desk.acc/puzzle.s @@ -2,12 +2,12 @@ .include "apple2.inc" .include "../inc/apple2.inc" - .include "../inc/prodos.inc" - .include "../mgtk.inc" - .include "../desktop.inc" ; redraw icons after window move, font + .include "../desktop.inc" .include "../macros.inc" +;;; ============================================================ + .org $800 jmp copy2aux diff --git a/desk.acc/show.image.file.s b/desk.acc/show.image.file.s index 3879fe3..0a2919d 100644 --- a/desk.acc/show.image.file.s +++ b/desk.acc/show.image.file.s @@ -3,11 +3,12 @@ .include "apple2.inc" .include "../inc/apple2.inc" .include "../inc/prodos.inc" - .include "../mgtk.inc" - .include "../desktop.inc" ; get selection, font + .include "../desktop.inc" .include "../macros.inc" +;;; ============================================================ + .org $800 start: jmp copy2aux diff --git a/desk.acc/show.text.file.s b/desk.acc/show.text.file.s index 09a32b6..c325d57 100644 --- a/desk.acc/show.text.file.s +++ b/desk.acc/show.text.file.s @@ -3,11 +3,12 @@ .include "apple2.inc" .include "../inc/apple2.inc" .include "../inc/prodos.inc" - .include "../mgtk.inc" - .include "../desktop.inc" ; get/clear selection, font + .include "../desktop.inc" .include "../macros.inc" +;;; ============================================================ + .org $800 dummy1000 := $1000 diff --git a/desk.acc/sort.directory.s b/desk.acc/sort.directory.s index e92815d..e353bb4 100644 --- a/desk.acc/sort.directory.s +++ b/desk.acc/sort.directory.s @@ -3,11 +3,12 @@ .include "apple2.inc" .include "../inc/apple2.inc" .include "../inc/prodos.inc" - .include "../mgtk.inc" .include "../desktop.inc" .include "../macros.inc" +;;; ============================================================ + .org $800 diff --git a/inc/prodos.inc b/inc/prodos.inc index be80b9e..2bff39e 100644 --- a/inc/prodos.inc +++ b/inc/prodos.inc @@ -201,18 +201,6 @@ NAME_LENGTH_MASK := $0F .addr addr .endmacro -.macro PASCAL_STRING str,res ; Length-prefixed string - .local data ; Can include control chars by using: - .local end ; PASCAL_STRING {"abc",$0D,"def"} - .byte end - data -data: .byte str -end: -.if .paramcount > 1 - .res res - (end - data), 0 -.endif -.endmacro - - .macro DEFINE_OPEN_PARAMS name, pn, io, rn .if .xmatch(.string(pn), "pathname") ;; If 'pathname' is passed then expansion yields a circular reference. diff --git a/macros.inc b/macros.inc index 47da957..b25a37e 100644 --- a/macros.inc +++ b/macros.inc @@ -22,6 +22,25 @@ .endif .endmacro +;;; ============================================================ +;;; Length-prefixed string +;;; +;;; Can include control chars by using: +;;; +;;; PASCAL_STRING {"abc",$0D,"def"} + +.macro PASCAL_STRING str,res + .local data + .local end + .byte end - data +data: .byte str +end: +.if .paramcount > 1 + .res res - (end - data), 0 +.endif +.endmacro + + ;;; ============================================================ ;;; Pad with zeros to the given address