[46] | 1 | ;
|
---|
[51] | 2 | ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
|
---|
| 3 | ;
|
---|
| 4 | ; This file is part of AiR-BOOT
|
---|
| 5 | ;
|
---|
| 6 | ; AiR-BOOT is free software: you can redistribute it and/or modify it under
|
---|
| 7 | ; the terms of the GNU General Public License as published by the Free
|
---|
| 8 | ; Software Foundation, either version 3 of the License, or (at your option)
|
---|
| 9 | ; any later version.
|
---|
| 10 | ;
|
---|
| 11 | ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
|
---|
| 12 | ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
|
---|
| 13 | ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
---|
| 14 | ; details.
|
---|
| 15 | ;
|
---|
| 16 | ; You should have received a copy of the GNU General Public License along with
|
---|
| 17 | ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 18 | ;
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | ;
|
---|
[46] | 22 | ; AiR-BOOT Version Information.
|
---|
| 23 | ;
|
---|
| 24 |
|
---|
| 25 | ;
|
---|
| 26 | ; First we define the numeric (BCD) AiR-BOOT version information.
|
---|
| 27 | ; This is used to derive ASCII and other representations.
|
---|
| 28 | ;
|
---|
| 29 |
|
---|
| 30 | ; AiR-BOOT version conform WarpIN format with implicit 0 as fourth number.
|
---|
| 31 | ; Note that the config-version is managed manually.
|
---|
| 32 | AB_MAJOR_VERSION EQU 1
|
---|
[55] | 33 | AB_MIDDLE_VERSION EQU 1
|
---|
[63] | 34 | AB_MINOR_VERSION EQU 1
|
---|
[46] | 35 |
|
---|
| 36 | ; The Year, Month and Day in BCD so we can easily extract nibbles.
|
---|
[63] | 37 | AB_YEAR EQU 2016h
|
---|
| 38 | AB_MONTH EQU 10h
|
---|
[64] | 39 | AB_DAY EQU 10h
|
---|
[46] | 40 |
|
---|
| 41 | ; The Hours, Minutes and Seconds, again in BCD for easy manipulation.
|
---|
[63] | 42 | ;~ AB_HOURS EQU 01h
|
---|
| 43 | ;~ AB_MINUTES EQU 01h
|
---|
| 44 | ;~ AB_SECONDS EQU 01h
|
---|
| 45 | AB_HOURS EQU 99h
|
---|
| 46 | AB_MINUTES EQU 99h
|
---|
| 47 | AB_SECONDS EQU 99h
|
---|
[46] | 48 |
|
---|
| 49 | ; The AiR-BOOT signature uses big-endian so we shuffle some bits around.
|
---|
| 50 | AB_SIG_VERSION EQU (((AB_MIDDLE_VERSION SHL 4) OR AB_MINOR_VERSION) SHL 8) OR AB_MAJOR_VERSION
|
---|
| 51 | AB_SIG_YEAR EQU ((AB_YEAR SHR 8) OR (AB_YEAR SHL 8) AND 0FFFFh)
|
---|
| 52 | AB_SIG_DATE EQU (AB_MONTH SHL 8) OR AB_DAY
|
---|
| 53 |
|
---|
| 54 | ;
|
---|
| 55 | ; This macro inserts the AiR-BOOT signature at the place where it is invoked.
|
---|
| 56 | ;
|
---|
| 57 | InsertAirbootSignature MACRO lang
|
---|
| 58 | db 'AiRBOOT'
|
---|
| 59 | dw AB_SIG_DATE
|
---|
| 60 | dw AB_SIG_YEAR
|
---|
| 61 | dw AB_SIG_VERSION
|
---|
| 62 | ; Wasm can only process the reference to 'lang' in pass 2 because it comes
|
---|
| 63 | ; from an included file which it has not processed yet at pass 1.
|
---|
| 64 | IFDEF WASM
|
---|
| 65 | IF2
|
---|
| 66 | db lang
|
---|
| 67 | ENDIF
|
---|
| 68 | ; The other assemblers process 'lang' correctly in pass 1.
|
---|
| 69 | ELSE
|
---|
| 70 | db lang
|
---|
| 71 | ENDIF
|
---|
| 72 | ENDM
|
---|