Jump to content

Generate lower case ASCII alphabet: Difference between revisions

Line 2,621:
<lang XPL0>char I, A(26);
for I:= 0 to 26-1 do A(I):= I+^a</lang>
 
=={{header|Z80 Assembly}}==
<lang z80> org &8000
ld a,'a' ;data
ld b,26 ;loop counter
ld hl,Alphabet ;destination
loop:
ld (hl),a ;store "a" into ram
inc a ;next letter
inc hl ;next storage byte
djnz loop ;repeat until 26 letters were stored.
call Monitor_MemDump ;hexdumps the specified address and bytecount to screen - created by Keith S. of Chibiakumas
byte 32 ;number of bytes to display
word Alphabet ;address to dump from
 
ret ;return to basic
 
Alphabet:
ds 26,0 ;reserve 26 bytes of ram, init all to zero.</lang>
 
{{out}}
<pre>
8013:
61 62 63 64 65 66 67 68 abcdefgh
69 6A 6B 6C 6D 6E 6F 70 ijklmnop
71 72 73 74 75 76 77 78 qrstuvwx
79 7A 00 00 00 00 00 00 yz
</pre>
 
 
=={{header|zkl}}==
1,489

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.