mirror of
https://github.com/byteworksinc/ORCALib.git
synced 2025-02-07 04:30:31 +00:00
add the c99 isblank() function
This commit is contained in:
parent
8533ea221c
commit
6006cefc70
30
ctype.asm
30
ctype.asm
@ -101,6 +101,32 @@ yes lda #1
|
||||
rtl
|
||||
end
|
||||
|
||||
****************************************************************
|
||||
*
|
||||
* int isblank (int c)
|
||||
*
|
||||
* Inputs:
|
||||
* 4,S - digit to test
|
||||
*
|
||||
* Outputs:
|
||||
* A - result
|
||||
*
|
||||
****************************************************************
|
||||
*
|
||||
isblank start
|
||||
|
||||
lda 4,S fetch the operand
|
||||
tax
|
||||
lda 2,S remove parm from stack
|
||||
sta 4,S
|
||||
pla
|
||||
sta 1,S
|
||||
inx form the result
|
||||
lda >__ctype2,X
|
||||
and #_blank
|
||||
rtl
|
||||
end
|
||||
|
||||
****************************************************************
|
||||
*
|
||||
* int iscntrl (int c)
|
||||
@ -844,7 +870,7 @@ __ctype2 start
|
||||
dc i1'0' $06
|
||||
dc i1'0' $07
|
||||
dc i1'0' $08
|
||||
dc i1'0' $09
|
||||
dc i1'_blank' $09
|
||||
dc i1'0' $0A
|
||||
dc i1'0' $0B
|
||||
dc i1'0' $0C
|
||||
@ -867,7 +893,7 @@ __ctype2 start
|
||||
dc i1'0' $1D
|
||||
dc i1'0' $1E
|
||||
dc i1'0' $1F
|
||||
dc i1'0' ' '
|
||||
dc i1'_blank' ' '
|
||||
dc i1'0' !
|
||||
dc i1'0' "
|
||||
dc i1'0' #
|
||||
|
@ -36,6 +36,7 @@ _print gequ $80 [' '..'~']
|
||||
_csym gequ $01 ['0'..'9','A'..'Z','a'..'z','_']
|
||||
_csymf gequ $02 ['A'..'Z','a'..'z'.'_']
|
||||
_octal gequ $04 ['0'..'7']
|
||||
_blank gequ $08 ['\t', ' ']
|
||||
;
|
||||
; signal numbers
|
||||
;
|
||||
|
Loading…
x
Reference in New Issue
Block a user