Jump to content

Help understanding assembly language programming

Featured Replies

Hi,

 

I am new to computer science and am having a hard time understanding assembly language programming. I have an assignment to write an Pep/8 assembly language program to output my first and last name on the output device using direct addressing with a .ASCII pseudo-op.

 

She gave us an example on a powerpoint, but I don't understand it.

 

 

 

CHARO 0x000D,d

CHARO 0x000E,d

CHARO 0x000F,d

CHARO 0x0010,d

STOP

; ----- SOD -----

.ASCII “KimT"

.END

 

I know that direct addressing means I will be fetching the character stored in the location specified. What I don't understand is where the numbers come from. 0x000D = K?

 

I know that they are written in hex, so I thought maybe it was the hex values on the ASCII table.. but it's not. Where do they come from?

 

Any help it all is greatly appreciated! Thanks!

Hi,

 

I am new to computer science and am having a hard time understanding assembly language programming. I have an assignment to write an Pep/8 assembly language program to output my first and last name on the output device using direct addressing with a .ASCII pseudo-op.

 

She gave us an example on a powerpoint, but I don't understand it.

 

 

 

CHARO 0x000D,d

CHARO 0x000E,d

CHARO 0x000F,d

CHARO 0x0010,d

STOP

; ----- SOD -----

.ASCII “KimT"

.END

 

I know that direct addressing means I will be fetching the character stored in the location specified. What I don't understand is where the numbers come from. 0x000D = K?

 

I know that they are written in hex, so I thought maybe it was the hex values on the ASCII table.. but it's not. Where do they come from?

 

Any help it all is greatly appreciated! Thanks!

 

Its been a few years since i had to use assembly language but i believe the line 'ASCII "KimT"' creates a buffer in your code containing the ascii values for "KimT" in this case.

The value 0x000D is an offset from the start of the program to the first character of this buffer, 0x000E points to the second character etc.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.