Skip to content

Instantly share code, notes, and snippets.

View hikilaka's full-sized avatar
🤟

Zack Penn hikilaka

🤟
View GitHub Profile
@hikilaka
hikilaka / loop02.s.arm
Created July 16, 2015 03:32
1+2+3...+22=?
; loop02.s.arm
.text
.global main
main:
mov r0, #0 ; accumulator
mov r1, #1 ; step
b check_loop
loop:
add r0, r1 ; accumulator += step
add r1, #1 ; step += 1
.text
.global main
; r0 = accumulator
; r1 = first
; r2 = second
; r3 = step
main:
mov r1, #0
mov r2, #1
/* array03.s.arm */
.data
.balign 4 // array of 100 integers (4 bytes each)
a: .skip 400
.balign 4 // struct of 1 char and 1 integer
s: .skip 8 // 8 bytes in total for padding (4-byte aligned)
.text
; input01.s.arm
.data
.balign 4 ; scanf format
in_format: .asciz "%d"
.balign 4 ; printf format
out_format: .asciz "%d\n"
.balign 4 ; read number from stdin
input_num: .word 0
.data
.balign 4
zero_file: .string "/dev/zero"
.balign 4
fail_open_msg: .ascii "cannot open /dev/zero!\n"
.set fail_open_msg_sz, . - fail_open_msg
.balign 4
.data
.balign 4
strbuf: .skip 25
.set strbuf_sz, . - strbuf
.balign 4
newline: .ascii "\n"
.set newline_sz, . - newline
.text
require 'cinch'
require 'nokogiri'
require 'open-uri'
class FML
include Cinch::Plugin
match /fml/
def initialize(*args)
public void method212(int i, int j, int k, int l, int i1) {
int j1 = 256 - i1;
int k1 = (l >> 16 & 0xff) * i1;
int l1 = (l >> 8 & 0xff) * i1;
int i2 = (l & 0xff) * i1;
int i3 = j - k;
if (i3 < 0)
i3 = 0;
int j3 = j + k;
if (j3 >= menuDefaultHeight)
#!/bin/bash
REDTEXT="\e[91m"
GREENTEXT="\e[92m"
PLAINTEXT="\e[39m"
err_str() {
echo -e "$(echo $REDTEXT)$1$(echo $PLAINTEXT)"
}