This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.text | |
.global main | |
; r0 = accumulator | |
; r1 = first | |
; r2 = second | |
; r3 = step | |
main: | |
mov r1, #0 | |
mov r2, #1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.data | |
.balign 4 | |
strbuf: .skip 25 | |
.set strbuf_sz, . - strbuf | |
.balign 4 | |
newline: .ascii "\n" | |
.set newline_sz, . - newline | |
.text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cinch' | |
require 'nokogiri' | |
require 'open-uri' | |
class FML | |
include Cinch::Plugin | |
match /fml/ | |
def initialize(*args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.device ATmega328P | |
.org 0x0000 | |
jmp reset | |
; mem loc for interript 0 | |
.org 0x0002 | |
jmp button_pushed | |
button_pushed: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REDTEXT="\e[91m" | |
GREENTEXT="\e[92m" | |
PLAINTEXT="\e[39m" | |
err_str() { | |
echo -e "$(echo $REDTEXT)$1$(echo $PLAINTEXT)" | |
} |
OlderNewer