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 |
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). |
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
exit | |
break start | |
exit | |
n | |
i reg | |
i reg cl | |
i reg dh | |
exit | |
n | |
i reg eax |
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
; 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 |
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
; 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 |
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
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. |
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
; 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 |
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
@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 |
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
{ | |
"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", |
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
no-csp-reports: * true | |
no-large-media: behind-the-scene false | |
* ads-twitter.com * block | |
* audio-ak-spotify-com.akamaized.net * block | |
* doubleclick.net * block | |
* dscc.akamai.net * block | |
* a1520.dscc.akamai.net * block | |
* a297.dscc.akamai.net * block | |
* google-analytics.com * block | |
* googleoptimize.com * block |