home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
550b.lha
/
Term_v1.8a
/
Source.LZH
/
CodeCmp.asm
< prev
next >
Wrap
Assembly Source File
|
1991-07-06
|
2KB
|
104 lines
* $Revision Header * Header built automatically - do not edit! *************
*
* (C) Copyright 1990 by Olaf 'Olsen' Barthel & MXM
*
* Name .....: CodeCmp.asm
* Created ..: Monday 21-Jan-91 20:12
* Revision .: 0
*
* Date Author Comment
* ========= ======== ====================
* 21-Jan-91 Olsen Created this file!
*
* $Revision Header *********************************************************
csect text,0,0,1,2
*--------------------------------------------------------------------------
*
* This file contains small and fast character comparison routines
* which are employed by the VT100/ANSI control sequence parser.
*
*--------------------------------------------------------------------------
xdef _Num1
_Num1: move.l 4(sp),d0
cmp.w #'0',d0
blt.s 1$ ; d0 < '0'
cmp.w #'9',d0
bgt.s 1$ ; d0 > '9'
moveq #1,d0
rts
1$ moveq #0,d0
rts
*--------------------------------------------------------------------------
xdef _Num2
_Num2: move.l 4(sp),d0
cmp.w #'0',d0
blt.s 3$ ; d0 < '0'
cmp.w #'9',d0
bgt.s 1$ ; d0 > '9'
2$ moveq #1,d0
rts
1$ cmp.w #';',d0 ; d0 = ';'
beq.s 2$
3$ moveq #0,d0
rts
*--------------------------------------------------------------------------
xdef _Num3
_Num3: move.l 4(sp),d0
cmp.w #'?',d0 ; d0 = '?'
beq.s 2$
cmp.w #'0',d0
blt.s 1$ ; d0 < '0'
cmp.w #'9',d0
bgt.s 1$ ; d0 > '9'
2$ moveq #1,d0
rts
1$ moveq #0,d0
rts
*--------------------------------------------------------------------------
xdef _Num4
_Num4: move.l 4(sp),d0
cmp.w #'=',d0 ; d0 = '='
beq.s 2$
cmp.w #'0',d0
blt.s 1$ ; d0 < '0'
cmp.w #'9',d0
bgt.s 1$ ; d0 > '9'
2$ moveq #1,d0
rts
1$ moveq #0,d0
rts
end