From: ian Date: Sat, 26 Nov 2005 16:46:02 +0000 (+0000) Subject: proper error handling for unknown clocks X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=155387a60473cfa7637beab8dd5bafba1805090e;p=trains.git proper error handling for unknown clocks --- diff --git a/iwjpictest/copybits.asm b/iwjpictest/copybits.asm index ef01cf3..c1c3eb6 100644 --- a/iwjpictest/copybits.asm +++ b/iwjpictest/copybits.asm @@ -20,10 +20,11 @@ COUNTOUTER equ 0x02 if mclock==20000 OUTEREXP equ 7 ; 2^7 * 2.6ms = 332ms - endif + else if mclock==1000 OUTEREXP equ 2 ; 2^2 * 52ms = 208ms endif + endif ; we always leave each loop when its counter has reached 0, so on ; entry we assume it's already 0. For the loops which want to diff --git a/iwjpictest/serialloop.asm b/iwjpictest/serialloop.asm index c9836a0..64a4cd4 100644 --- a/iwjpictest/serialloop.asm +++ b/iwjpictest/serialloop.asm @@ -17,10 +17,11 @@ COUNTOUTER equ 0x02 if mclock==20000 OUTEREXP equ 7 ; 2^7 * 1.4ms = 177ms - endif + else if mclock==1000 OUTEREXP equ 3 ; 2^3 * 28ms = 224ms endif + endif ; we always leave each loop when its counter has reached 0, so on ; entry we assume it's already 0. For the loops which want to