From e832c81a6f508c7caa206b356ced84f2e5e05570 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 6 Oct 2010 18:40:42 +0000 Subject: [PATCH] * New macros 'ldsw' and 'stsw' git-svn-id: svn://cu.loc/avr-cpm/trunk@127 57430480-672e-4586-8877-bcf8adbbf3b7 --- avrcpm/avr/config.inc | 28 ++++++++++++++-------------- avrcpm/avr/macros.inc | 18 +++++++++++++++++- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/avrcpm/avr/config.inc b/avrcpm/avr/config.inc index 1331f5b..62f07e4 100644 --- a/avrcpm/avr/config.inc +++ b/avrcpm/avr/config.inc @@ -23,7 +23,7 @@ #define VMAJOR 2 /* Version number */ -#define VMINOR 0 +#define VMINOR 1 #ifndef DRAM_8BIT #define DRAM_8BIT 1 /* 1 = 8bit wide DRAM */ @@ -61,21 +61,21 @@ #define EM_Z80 0 /* we don't have any z80 instructions yet */ -.equ BOOT_DEBUG = 0 -.equ MMC_DEBUG = 0 /* Increase for more debugging */ -.equ FAT16_DEBUG = 0 +.equ BOOT_DEBUG = 0 +.equ MMC_DEBUG = 0 /* Increase for more debugging */ +.equ FAT16_DEBUG = 0 .equ FAT16_RWDEBUG = 0 .equ FAT16_DBG_FAT = 0 -.equ INS_DEBUG = 0 -.equ MEMTEST = 1 -.equ BOOTWAIT = 1 -.equ PORT_DEBUG = 0 -.equ DISK_DEBUG = 0 /* Increase for more debugging */ -.equ HOSTRW_DEBUG= 0 -.equ MEMFILL = 1 -.equ STACK_DBG = 0 -.equ PRINT_PC = 0 -.equ HEAP_DEBUG = 1 +.equ INS_DEBUG = 0 +.equ MEMTEST = 1 +.equ BOOTWAIT = 1 +.equ PORT_DEBUG = 0 +.equ DISK_DEBUG = 0 /* Increase for more debugging */ +.equ HOSTRW_DEBUG = 0 +.equ MEMFILL = 1 +.equ STACK_DBG = 0 +.equ PRINT_PC = 0 +.equ HEAP_DEBUG = 0 #define MMC_SPI2X 1 /* 0 = SPI CLK/4, 1 = SPI CLK/2 */ diff --git a/avrcpm/avr/macros.inc b/avrcpm/avr/macros.inc index 0c88274..5152902 100644 --- a/avrcpm/avr/macros.inc +++ b/avrcpm/avr/macros.inc @@ -59,6 +59,22 @@ ldi @0h, high(@1) .endm +;------------------------------------------------ +; load 16 bit direct from data space + +.macro ldsw + lds @0l, @1 + lds @0h, @1+1 +.endm + +;------------------------------------------------ +; store 16 bit direct to data space + +.macro stsw + sts @0, @1l + sts @0+1,@1h +.endm + ;------------------------------------------------ ; add 16 bit constant to register pair @@ -119,7 +135,7 @@ ; call @0 .ifdef @0 - .if abs(PC - @0) > 2048 + .if abs(PC - @0) > 2047 call @0 .else rcall @0 -- 2.39.2