From cc49835c9f7be862f7adbeb009e7f3d1d9ce5e6c Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Mon, 21 Dec 2020 13:27:54 -0800 Subject: [PATCH] RAM.DRV.SYSTEM: Show block count. Resolves #2 --- inc/apple2.inc | 17 +++++++++++++++++ ram.drv/ram.drv.system.s | 16 +++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/inc/apple2.inc b/inc/apple2.inc index 1dedf33..545ef97 100644 --- a/inc/apple2.inc +++ b/inc/apple2.inc @@ -68,6 +68,13 @@ SETKBD := $FE89 SETVID := $FE93 BELL := $FF3A +;;; ============================================================ +;;; Applesoft ROM routines +;;; ============================================================ +;;; These require various ZP locations to be initialized. + +LINPRNT := $ED24 ; print X,A as integer + ;;; ============================================================ ;;; Well-known RAM locations ;;; ============================================================ @@ -75,3 +82,13 @@ BELL := $FF3A INPUT_BUFFER := $200 RESETVEC := $3F2 COL80HPOS := $57B + +;;; ============================================================ +;;; Applesoft Zero Page Locations +;;; ============================================================ + +TEMPPT := $52 +TEMPST := $55 +SHIFT_SIGN_EXT := $A4 +SPEEDZ := $F1 +FLASH_BIT := $F3 diff --git a/ram.drv/ram.drv.system.s b/ram.drv/ram.drv.system.s index 7512fd5..652f156 100644 --- a/ram.drv/ram.drv.system.s +++ b/ram.drv/ram.drv.system.s @@ -411,7 +411,21 @@ install_success: jsr HOME jsr zstrout - scrcode "\r\r\r", PRODUCT, " - Installed" + scrcode "\r\r\r", PRODUCT, " - " + .byte 0 + + ;; Initialize Applesoft zero page locations required by LINPRNT + copy #0, SHIFT_SIGN_EXT ; required by FP routines + copy #TEMPST, TEMPPT ; string descriptor pointer + copy #1, SPEEDZ ; output delay + copy #0, FLASH_BIT ; character set mask + + ldx vol_dir_header+VolumeDirectoryHeader::total_blocks + lda vol_dir_header+VolumeDirectoryHeader::total_blocks+1 + jsr LINPRNT + + jsr zstrout + scrcode " Blocks" .byte 0 rts