Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
|
|
@ -0,0 +1,3 @@
|
|||
10 for i = asc("a") to asc("z")
|
||||
20 print chr$(i);
|
||||
30 next i
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
void main() {
|
||||
List<String> lower =
|
||||
List.generate(26, (index) => String.fromCharCode(97 + index));
|
||||
print(lower);
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
10 FOR I = ASC("a") TO ASC("z")
|
||||
20 PRINT CHR$(I);
|
||||
30 NEXT I
|
||||
|
|
@ -0,0 +1 @@
|
|||
seq char a z
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
uses console
|
||||
|
||||
int i
|
||||
|
||||
for i = asc("a") to asc("z")
|
||||
print chr(i);
|
||||
next i
|
||||
|
||||
printl cr "Enter ..."
|
||||
waitkey
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
; compile with:
|
||||
; nasm -f elf64 alpha.asm -o alpha.o
|
||||
; ld -z noexecstack -no-pie -s alpha.o -o alpha
|
||||
|
||||
global _start
|
||||
|
||||
section .text
|
||||
_start:
|
||||
xor rax, rax
|
||||
.loop:
|
||||
mov dil, 'a' ;Our character
|
||||
add dil, al ;add number in rax/al
|
||||
mov byte[alphabet + rax], dil ;store character to memory
|
||||
inc rax ;increment rax
|
||||
cmp rax, 26 ;is rax less than 26?
|
||||
jl .loop ;yes? jump to .loop
|
||||
.print:
|
||||
mov byte[alphabet + rax], 0x0a ;Make the last character an lf.
|
||||
mov rax, 1 ;write to
|
||||
mov rdi, 1 ;stdout
|
||||
mov rsi, alphabet ;pointer to string
|
||||
mov rdx, 27 ;the number of characters
|
||||
syscall ;print it!
|
||||
.exit:
|
||||
mov rax, 60 ;exit
|
||||
xor rdi, rdi ;exit code zero
|
||||
syscall
|
||||
|
||||
section .bss
|
||||
alphabet: resb 27
|
||||
Loading…
Add table
Add a link
Reference in a new issue