view lib/alib/is_upper.as @ 3278:ea1afb494127

defs: Add Bt.Sec for atari and corsham
author Tormod Volden <debian.tormod@gmail.com>
date Sat, 07 Mar 2020 23:52:40 +0100
parents 03f26e88b809
children
line wrap: on
line source

*****************************************

* See if character in "B" is a uppercase letter

* OTHER MODULES NEEDED: none

* ENTRY: B=character to test

* EXIT: CC zero=1 if uppercase, 0 if not

 nam Is Char Uppercase?
 ttl Assembler Library Module


 section .text


IS_UPPER:
 cmpb #'A 
 blo no not uppercase, zero cleared
 cmpb #'Z if equal, zero set
 bhi no not upperc, zero cleared
 orcc #%00000100 set zero

no
 rts

 endsect