Answer:
oid changeCase (char char_array[], int array_size ) {
__asm{
mov eax, char_array;
mov edi, 0;
readArray:
cmp edi, array_size;
jge exit;
mov ebx, edi;
shl ebx, 2;
mov cl, [eax + ebx];
check:
//working on it
cmp cl, 0x41;
jl next_indx;
cmp cl, 0x7A;
jg next_indx;
cmp cl, 'a';
jl convert_down;
jge convert_up;
convert_down:
or cl, 0x20; //make it lowercase
jmp write;
convert_up:
and cl, 0x20;
jmp write;
write:
mov byte ptr [eax + ebx], cl
next_indx:
inc edi;
exit:
cmp edi, array_size;
jl readArray;
mov char_array, eax;
}
}
Explanation:
- Move char_array to eax as it is base image
.
- Use ebx as offset
.
- Use ecx as the storage register
.
- check if cl is <= than ASCII value 65 (A)
.
Answer:
Always encrypt data never store anything in plain text someone could use wireshark to pull out a data packet and if the data is not encrypted, expect things to happen.
Answer:
7 bytes
Explanation:
<u>2 Address Instruction</u>
The 2 address instruction consist 3 components in the format.
One is opcode,other two are addresses of destination and source.
<u>Example-</u>
load b,c | Opcode destination address,source address
add a,d | Opcode destination address,source address
sub c,f | Opcode destination address,source address
Opcode consists of 1 bytes whereas destination address and source address consist of 3 bytes each.
(1+3+3) bytes=7 bytes