5 Replies - 679 Views - Last Post: 10 November 2012 - 09:33 PM

#1 Masterlaw  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-November 12

Outputting characters wtihout strings

Posted 10 November 2012 - 01:15 PM

Hi everybody, I have tried to find out how to output just characters, without strings, for the last 2 days, and I cannot find anything on the subject! I need to output some characters without strings, on Ubuntu, without C libraries, and the reason that I am posting this is because I do not even have a clue where to start. Thank you in advance. Note, I am REALLY bad with assemby, so please keep it as simple as possible.

Thanks again
Is This A Good Question/Topic? 0
  • +

Replies To: Outputting characters wtihout strings

#2 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,281
  • Joined: 28-March 11

Re: Outputting characters wtihout strings

Posted 10 November 2012 - 04:21 PM

Er, a string is just a bunch of characters, a character is a string...

You do know that by printing to the terminal without using the C lib, your app can break with the next OS update.

Few tutorials here: http://www.dreaminco...uage-tutorials/

There are links here http://www.dreaminco...etting-started/ your interested in Linux System Calls.

I find it really hard to believe you cannot find any info. What you put into Assembly is what you get out of it/gain from it.
Was This Post Helpful? 0
  • +
  • -

#3 Masterlaw  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-November 12

Re: Outputting characters wtihout strings

Posted 10 November 2012 - 05:47 PM

To clarify, I need to output the ASCII characters instead of strings. I am not sure if it uses hex, dec, or oct, but I do now know how to do it without strings.
Was This Post Helpful? 0
  • +
  • -

#4 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,281
  • Joined: 28-March 11

Re: Outputting characters wtihout strings

Posted 10 November 2012 - 05:49 PM

Ok, so if a user types in the number 1, you need to convert that to an ASCII one. A String IS just a bunch of ASCII characters.
Was This Post Helpful? 0
  • +
  • -

#5 Masterlaw  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 10-November 12

Re: Outputting characters wtihout strings

Posted 10 November 2012 - 09:27 PM

What I was meaning is, I need to output using the direct ASCII value. I am trying to output a phrase, such as "Hello World!", but by telling the code to output 48, or whatever the code of H is. That is what I mean. If it was DOS, it would be
mov ah,02h
int 21
or something like that. I am not very good at assembly, but that is the general idea.
Was This Post Helpful? 0
  • +
  • -

#6 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,281
  • Joined: 28-March 11

Re: Outputting characters wtihout strings

Posted 10 November 2012 - 09:33 PM

I gave you a link to linux system calls, did you not look at the links? I also pointed you to our tutorial section, did you also forget to look there? There are some linux samples there for input and output using linux interrupts.

I am all for helping someone learn Assembly. However, YOU must show some effort... I will say that again, YOU must show some effort.

So you know how to do it with DOS interrupts? How would you do it using interrupts in Linux? Look over the links to the system calls, and tutorials... read, learn, try some code and when you are stuck, post the code you are having trouble with and we will help you fix it...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1