Skip to content

Instantly share code, notes, and snippets.

View AliLtRP's full-sized avatar
🎯
Focusing

Ali Ahmed AliLtRP

🎯
Focusing
View GitHub Profile
@AliLtRP
AliLtRP / asciiValue.java
Last active August 28, 2022 11:16
How to convert a string into the sum of ASCII values? in java, OOP
public class main {
public static void main(String[] args) {
Ascii a = new Ascii(); //make an object
a.setS("An example"); // the string we want to get the sum of it in asii
a.asciValue(a.getS()); // pass the string as argument
a.print(); // print the result
}
}
class Ascii{
@AliLtRP
AliLtRP / Count_Odd_Numbers_below_N.asm
Created August 26, 2022 17:33
Count Odd Numbers Below N in x86_64 Nasm
section .text
global oddcnt
; <-- EAX oddcnt(EDI n) -->
oddcnt:
xor eax, eax
mov edx, 0
mov eax, edi
mov ebx, 2