Skip to content

Instantly share code, notes, and snippets.

@mikecat
Created June 13, 2014 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikecat/f81985c534099cffe39a to your computer and use it in GitHub Desktop.
Save mikecat/f81985c534099cffe39a to your computer and use it in GitHub Desktop.
CodeIQ 第三回デスマコロシアム 解答コード
dd 3783868522,78643634,33477513,964722893,49378682
dd 2176389299,2172945282,67372265,984764676,78695422,28569973,3443974537,128
; output "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz"
; 58 chars
; 'A' == 0x41
; 'z' == 0x7A
bits 32
global _start
section .text
_start:
; for little endian
push 0x40
mov ecx,esp
makestr_loop:
mov dl,1
mov al,4
mov ebx,edx
inc byte [ecx]
int 0x80
cmp byte [ecx], 0x7A
jnz makestr_loop
db 2
; output "ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz"
; 58 chars
; 'A' == 0x41
bits 32
global _start
section .text
_start:
; for little endian
mov bl,16
mov ecx,0x84838281
makestr_loop:
sub ecx,0x04040404
push ecx
mov dl,58
dec bl
mov al,4
jnz makestr_loop
mov bl,1
mov ecx,esp
inc esi
int 0x80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment