Generate lower case ASCII alphabet: Difference between revisions

(Add CLU)
Line 2,705:
abcdefghijklmnopqrstuvwxyz
</pre>
 
=={{header|WebAssembly}}==
<lang WebAssembly>(module $lowercase
 
(import "wasi_unstable" "fd_write"
(func $fd_write (param i32 i32 i32 i32) (result i32))
)
 
(memory 1)
(export "memory" (memory 0))
 
(func $main (export "_start")
(local $i i32)
(i32.store (i32.const 0) (i32.const 8)) ;; offset to start of string
(i32.store (i32.const 4) (i32.const 27)) ;; string length
 
(set_local $i (i32.const 0))
(loop
;; mem[i+8] = i+97
(i32.store (i32.add (get_local $i) (i32.const 8)) (i32.add (get_local $i) (i32.const 97)))
;; i = i+1
(set_local $i (i32.add (get_local $i) (i32.const 1)))
;; if i < 26 then loop
(br_if 0 (i32.lt_s (get_local $i) (i32.const 26)))
)
;; append a newline
(i32.store (i32.add (get_local $i) (i32.const 8)) (i32.const 10))
 
;; write to stdout
(call $fd_write
(i32.const 1) ;; output stream to write to (1 == stdout)
(i32.const 0) ;; memory location containing string offset and length
(i32.const 1) ;; number of strings to write
(i32.const 40) ;; location in memory to write number of bytes written
)
drop
)
)</lang>
 
{{out}}
<pre>
abcdefghijklmnopqrstuvwxyz
</pre>
 
 
=={{header|Wren}}==
222

edits