home *** CD-ROM | disk | FTP | other *** search
- ; > <Asm$LibRoot>general
-
- S0_bit * 1 :SHL: 0
- S1_bit * 1 :SHL: 1
- F_bit * 1 :SHL: 26
- I_bit * 1 :SHL: 27
- V_bit * 1 :SHL: 28
- C_bit * 1 :SHL: 29
- Z_bit * 1 :SHL: 30
- N_bit * 1 :SHL: 31
-
- MACRO
- $label PROC $name, $symbol
- $label DCB "$name"
- DCD &ff000000 + ((:LEN: "$name" + 3) :AND: &FFFC)
- [ "$symbol" = ""
- EXPORT $name
- |
- EXPORT $symbol
- ]
- MEND
-
- MACRO
- $label SWIX $swinum, $cc
- $label SWI$cc (1 :SHL: 17) :OR: $swinum
- MEND
-
- MACRO
- $label PRINT $message
- $label SWI XOS_WriteS
- = "$message", 0
- ALIGN
- MEND
-
- MACRO
- $label ERROR $code, $message
- $label & $code
- = "$message", 0
- ALIGN
- MEND
-
- MACRO
- $label CMD $module, $name, $routine, $min, $max, $GSTmap, $flags
- $label = "$name", 0
- ALIGN
- & $routine.Code - $module
- [ "$min" = ""
- & 0
- |
- = $min, $GSTmap, $max, $flags
- ]
- & $routine.Syntax - $module
- & $routine.Help - $module
- MEND
-
- MACRO
- $label DIV $div, $top, $bot, $temp
- ASSERT $top <> $bot
- ASSERT $top <> $temp
- ASSERT $bot <> $temp
- [ "$div" <> ""
- ASSERT $div <> $top
- ASSERT $div <> $bot
- ASSERT $div <> $temp
- ]
- $label MOV $temp, $bot
- CMP $temp, $top, LSR #1
- 90 MOVLS $temp, $temp, LSL #1
- CMP $temp, $top, LSR #1
- BLS %b90
- [ "$div" <> ""
- MOV $div, #0
- ]
- 91 CMP $top, $temp
- SUBCS $top, $top, $temp
- [ "$div" <> ""
- ADC $div, $div, $div
- ]
- MOV $temp, $temp, LSR #1
- CMP $temp, $bot
- BHS %b91
- MEND
-
- END
-