Skip to content

Instantly share code, notes, and snippets.

{
"timeStamp": 1700742074307,
"version": "1.53.0",
"userSettings": {
"advancedUserEnabled": true,
"cloudStorageEnabled": true,
"externalLists": "https://raw.githubusercontent.com/LanikSJ/ubo-filters/main/filters/cdn-filter-list.txt\nhttps://raw.githubusercontent.com/LanikSJ/ubo-filters/main/filters/malware-domains.txt\nhttps://raw.githubusercontent.com/LanikSJ/ubo-filters/main/filters/popads-domains.txt\nhttps://raw.githubusercontent.com/LanikSJ/ubo-filters/main/filters/youtube-antiadblock.txt",
"firewallPaneMinimized": false,
"importedLists": [
"https://raw.githubusercontent.com/LanikSJ/ubo-filters/main/filters/cdn-filter-list.txt",
@startuml
!theme sketchy-outline
skinparam participantFontSize 19
skinparam componentFontSize 19
skinparam activityArrowFontSize 19
skinparam actorFontSize 19
skinparam databaseFontSize 19
skinparam queueFontSize 19
title Sequence digram
; Data stored inside CPU register called _register data_.
; and accessing register data directly is addressing mode called _register addressing_
section .data
section .text
global .start
start:
mov rbp, rsi ; 64-bit
mov ecx, edx ; 32-bit
section .data
section .text
global .start
start:
; When you want to put the value 0 into a register, the fastest way is to use XOR.
; XORing a value againsnt it self yields 0.
xor rbx, rbx
; Yes, you could use `mov rbx, 0` instnad, but that has to go out to memory to load the immediate value 0
; XORing register against it self doesn't go out of the CPU for either the source or the destination, so its a little bit faster.
; Print a message out
; Aassmbl with:
; nasm -f elf64 -g -F stabs eatsyscall.asm
; ld -o eatsyscall eatsyscall.o
section .data
EatMsg: db "Eat at Joe's!", 10
EatLen: equ $-EatMsg
section .bss ; section containing the unintialized data
; MOV instruction
; Used to move a byte, word(16bit), double word(32bit), or quad word(64bit) from the source(second operand) to the dist(first operand).
; **Note** that the MOV instruction cannot move data directly from one address in memory to different address in memory
; to do that you need to _two separate MOV instructions: frst move the datat from the memory to some registry and then move it from that registry to the dist memory.
; Assemble with:
; nasm -f elf64 -g -F dwarf mov101.asm
; ld -o mov101 mov101.o
section .data
section .text
exit
break start
exit
n
i reg
i reg cl
i reg dh
exit
n
i reg eax
@0x61nas
0x61nas / RFLAGS.md
Last active February 6, 2024 16:52

RFlags is like a veritable junk drawer of disjointed little bits of information. RFlags as a whole is a single 64-bit register buried inside he CPU. It's the 64-bit extension of the 32-bit EFlags register, which in turn is the 32-bit extension of the 16-bit Flags register. There's only 18 bits of the RFlags register are actually flags. The reset is reserved for later use in future generations of Intel CPUs. A flag is a single bit of information, whose meaning is independent from any other bits. A bit can be set to 1 or clered to 0 by the CPU as its needs require.

I Shorthand Name Description
0 CF Carry Flag Used in assigned arithmetic operations. If the result of arithmetic or shift operation carries out a bit from the operand.
1 - Undefind -
2 PF Parity Flag Indecates whether the number of set (1) bits in the low-order byte of a result is even(set), or odd(cleard).
Instruction Operands Description
MOV dist, source Copy the data from the source to the distnation register or memory
INC dist Increment the distnation register or memory by one
DEC dist Decrement the distnation register or memory by one
JNZ dist(label) Tests the value of Zero Flag and jump to the distnation if its not set(a.k.a. set o 0)
JMP dist Always jump to its operand
ADD dist, source Add the source value to the distnation
NOP n/a No operation, it takes some time to execute
@0x61nas
0x61nas / brain-tumor-detection.ipynb
Created February 10, 2024 23:28
Brain Tumor Detection.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.