Skip to content

Instantly share code, notes, and snippets.

View norbekaiser's full-sized avatar

Norbert L. Ruehl norbekaiser

View GitHub Profile
@norbekaiser
norbekaiser / generate_ca.sh
Last active October 17, 2015 10:43
stuff for ssl
#!/bin/bash
# usage: generate_ca.sh rootca
# requires rootca.key
# Generates rootca.pem
if [ -z "$1" ]; then
echo "please specify key filename";
exit 1
fi
openssl req -x509 -new -nodes -key $1.key -days 1024 -out $1.pem
bit_to_a_0:
bta_0:
cmp ch,9
jg bta_1
add ch,'0'
jmp bta_fin
bta_1:
sub ch,10
add ch,'a'
bta_fin:
jmp execution
boot_string:
db 'String Hype',0 ; Null termination Hype
;;Requires BX to have the start address of our String , e.g. boot_string
print_string:
mov ah,0x0e
add bx,0x7c00;;//OFfset for getting the true memory adress
ps_l:
mov al,[bx]
cmp al,0
@norbekaiser
norbekaiser / login-firsttimepi.sh
Last active October 8, 2015 14:22
Raspberry Pi Kurs
ssh pi@raspberrypi #sofern der dhcp in eurem netzwerk dies richtig zuordnet müsste es möglich sein sich so einzuloggen
ssh pi@ip.adresse #alternativ die ip adresse des pis nutzen, die rc.local sorgt dafür dass diese beim hochfahren angezeigt wird
jmp shutdown
infloop:
jmp $
shutdown:
mov ah,0x53
mov al,0x07
mov bx,0x01
mov cx,0x03
int 0x15
times 510-($-$$) db 0
@norbekaiser
norbekaiser / hu_ittcalls.asm
Last active August 29, 2015 14:27
using a for loop to print 20 times '*'
mov ah, 0x0e
call starline
call newline
mov al,'H'
int 0x10
mov al,'u'
int 0x10
call newline
mov al,'*'
call doit20
@norbekaiser
norbekaiser / bochsrc
Last active August 29, 2015 14:27
make it bootable
floppya: 1_44=boot.bin, status=inserted
boot: a
@norbekaiser
norbekaiser / hu_calls.asm
Last active August 29, 2015 14:27
hu asm , with calls
mov ah, 0x0e
call starline
call newline
mov al,'H'
int 0x10
mov al,'u'
int 0x10
call newline
call starline
infloop:
@norbekaiser
norbekaiser / hu.asm
Last active August 29, 2015 14:27
prints out hu with a line of stars above and beyond
mov ah, 0x0e ; teletype
mov al,'*' ; ascii
times 20 int 0x10 ; call 20 times interrupt 10 to print 20 *
; newline
mov al,0x0a ;Linefeed
int 0x10
mov al,0x0d ;Cariage return
int 0x10
;
mov al,'H'
@norbekaiser
norbekaiser / huhu.asm
Last active August 29, 2015 14:27
nasm to print out huhu , via intterupt 10/ah from the bios teletype routine
mov ah, 0x0e ; set reg ah to 0x0e to inidcate teletype mode ,
mov al,'H' ; al needs to be the (ascii)value to print
int 0x10 ;required interrupt
mov al,'u'
int 0x10
mov al,'h'
int 0x10
mov al,'u'
int 0x10
jmp $;//inf loop current line