nitlanguage
/
nit.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge: doc: fixed some typos and other misc. corrections
[nit.git]
/
contrib
/
pep8analysis
/
tests
/
privat
/
06-majuscules.pep
1
; Semaine 6
2
; Programme qui transforme les minuscules en majuscules
3
; Jean Privat (C) 2010
4
loop: CHARI c,d ; do {
5
LDA 0,i
6
LDBYTEA c,d ; c = getChar();
7
CPA 'a',i
8
BRLT out
9
CPA 'z',i
10
BRGT out ; if (c>='a' && c<='z') {
11
ANDA 0x00DF,i
12
STBYTEA c,d ; c = c & 0xDF; // mise en majuscule }
13
out: CHARO c,d ; print(c);
14
CPA '\n',i
15
BRNE loop ; } while (c != '\n')
16
fin: STOP
17
c: .BLOCK 1 ; #1c
18
.END