forked from MightyPork/crsn
improve readme and example of the stdio module
This commit is contained in:
+10
-2
@@ -6,12 +6,20 @@
|
||||
|
||||
(:loop)
|
||||
(ld r0 @stdin)
|
||||
|
||||
; exit by pressing 'q'
|
||||
(cmp r0 'q'
|
||||
(=? (ld @stdout '\n')
|
||||
(halt)))
|
||||
|
||||
; uppercase ASCII
|
||||
(cmp r0 'a' (<? (j :badchar)))
|
||||
(cmp r0 'z' (>? (j :badchar)))
|
||||
(sub r0 32) ; to uppercase
|
||||
(sub r0 32)
|
||||
(ld @stdout r0)
|
||||
(j :loop)
|
||||
|
||||
(:badchar)
|
||||
(ld @stdout '🐈')
|
||||
(ld @stdout '🐈') ; show a kitty if not ASCII
|
||||
(j :loop)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user