From 8202b520b262cc0f27a4fa48eddc93e07d6d6042 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 13 Jun 2025 12:51:41 +0300 Subject: [PATCH] add Agat to samples --- include/target.h | 2 ++ libsrc/agat/_scrsize.s | 12 +++++++++--- samples/Makefile | 6 ++++++ samples/sieve.c | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/include/target.h b/include/target.h index 7663a39dd..5f9d8859c 100644 --- a/include/target.h +++ b/include/target.h @@ -37,6 +37,8 @@ # include #elif defined(__APPLE2__) # include +#elif defined(__AGAT__) +# include #elif defined(__ATARI__) # include #elif defined(__ATARI2600__) diff --git a/libsrc/agat/_scrsize.s b/libsrc/agat/_scrsize.s index f9d7c3785..09d7e879f 100644 --- a/libsrc/agat/_scrsize.s +++ b/libsrc/agat/_scrsize.s @@ -1,5 +1,6 @@ ; ; Ullrich von Bassewitz, 26.10.2000 +; Konstantin Fedorov, 12.06.2025 ; ; Screen size variables ; @@ -9,9 +10,14 @@ .include "agat.inc" screensize: - ldx WNDWDTH - lda WNDBTM + lda WNDWDTH + bit TATTR + bmi t64 + lsr +t64: + tax + lda WNDBTM sec - sbc WNDTOP + sbc WNDTOP tay rts diff --git a/samples/Makefile b/samples/Makefile index 3680f542c..295b6883d 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -158,6 +158,11 @@ DIRLIST = tutorial geos atari2600 atari5200 apple2 gamate lynx supervision sym1 # -------------------------------------------------------------------------- # Lists of executables +EXELIST_agat = \ + ascii \ + checkversion \ + hello \ + sieve EXELIST_apple2 = \ ascii \ @@ -390,6 +395,7 @@ all: # -------------------------------------------------------------------------- # List of every supported platform TARGETS := \ + agat \ apple2 \ apple2enh \ atari \ diff --git a/samples/sieve.c b/samples/sieve.c index 7c3b9cd75..5ffc97b62 100644 --- a/samples/sieve.c +++ b/samples/sieve.c @@ -12,7 +12,7 @@ /* Workaround missing clock stuff */ -#ifdef __APPLE2__ +#if defined(__APPLE2__) || defined(__AGAT__) # define clock() 0 # define CLOCKS_PER_SEC 1 #endif