From 7969d1d050a00a45087b48c7c87333022d691763 Mon Sep 17 00:00:00 2001 From: Leo Date: Fri, 6 Aug 2010 10:08:56 +0000 Subject: [PATCH] * avr/z80.asm: - Added a RAM disk git-svn-id: svn://cu.loc/avr-cpm/trunk@70 57430480-672e-4586-8877-bcf8adbbf3b7 --- avrcpm/avr/z80.asm | 203 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 175 insertions(+), 28 deletions(-) diff --git a/avrcpm/avr/z80.asm b/avrcpm/avr/z80.asm index 4b0e507..2c54bab 100644 --- a/avrcpm/avr/z80.asm +++ b/avrcpm/avr/z80.asm @@ -45,6 +45,8 @@ #define PARTID 0x52 /* Partition table id */ /* http://www.win.tue.nl/~aeb/partitions/partition_types-1.html */ +#define RAMDISKNR 'I'-'A' /* Driveletter for first RAM disk */ +#define RAMDISKCNT 1 /* Number of RAM disks */ #define UBRR_VAL ((F_CPU+BAUD*8)/(BAUD*16)-1) /* clever rounding */ @@ -249,6 +251,27 @@ +; -------------------- DRAM --------------- + +; DRAM_SETADDR val, low_and_mask, low_or_mask, high_and_mask, high_or_mask +.macro DRAM_SETADDR + mov temp,@0 +.if low(@1) != 0xff + andi temp,@1 +.endif +.if low(@2) != 0 + ori temp, @2 +.endif + out P_AL,temp + + mov temp,@0 +.if low(@3) != 0xff + andi temp,@3 +.endif + ori temp, @4 | (1<