Aceso
Aceso

Reputation: 1215

some assembly language syntax definition

I have had my third assembly language class and my teacher asked me about this line of code. is there anyone who explains this line in details? I am a real noob in this language. please speak as simple as you can.

    myMessage BYTE "He says, ",22h,"Hello, World!",22h,0dh,0ah,0

Upvotes: 0

Views: 773

Answers (1)

user1129665
user1129665

Reputation:

This line defines array of bytes, characters. It's similar to, in C:

typedef unsigned char BYTE;

BYTE myMessage[] = "He says, \x22Hello, World!\x22\r\n";

22h is " and 0dh is \r and 0ah is \n. The last 0 is a NULL byte that terminates the string. Look at the ASCII table.

Upvotes: 1

Related Questions