• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 195

Backtrace:

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/views/question.php
Line: 195
Function: _error_handler

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/controllers/Questions.php
Line: 416
Function: view

File: /home/u125378470/domains/lawhelpguru.org/public_html/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Print hexadecimal as ascii with NASM system call

So I want to print out the ascii value of what is stored in an address with a system call. Lets say i want to print the letter Z in hex this is 0x5a, so lets say in my preamble there I have a pointer ptr point to a element of an array, I transfer the value at the address into cl by:

mov edx, ptr
mov cl, [edx]

Now lets say the value 0x5a is in cl, how do I print this to STDOUT? I have tried (amoung other things):

mov eax, 4 ; SYS_WRITE
mov ebx, 1 ; STDOUT
;value to be prininted is in cl so it is in ecx
mov edx, 4 ; size of the item (tried 4 and 1)
int 80h ;interrupt

This prints absolutely nothing, what am I doing wrong? Do I need to declare something in .data / .bss? I want it to print Z

Thanks

EDIT:

So I can print Z by declaring in .data:

num db 90

Then using mov ecx, num in the system call. but how can I take the hex value in the register and do the same?