home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
CPM68K
/
SD68K.LBR
/
CAPS.S
next >
Wrap
Text File
|
2000-06-30
|
768b
|
26 lines
**** CAPS -- Capitalize Character
**
** Function:
** Capitalize the ASCII character in D1.b if it is a
** lower-case alphabetic (a-z); otherwise return unchanged.
** Only the lower 7 bits are considered. The most
** significant bit is cleared.
** Inputs: D1.b == character to capitalize
** Outputs: D1.b == capitalized character
** Registers affected: D1.b
** Routines called: -none-
** Special error conditions: -none-
*
.globl caps
.text
caps:
andi.b #$7f,d1 * mask off sign bit
cmpi.b #'a',d1
blt capsx * not a-z
cmpi.b #'z',d1
bgt capsx * not a-z
andi.b #$5f,d1 * a-z ==> A-Z
*
capsx: rts
.end