Welcome to Dream.In.Code
Become an Expert!

Join 137,420 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,977 people online right now. Registration is fast and FREE... Join Now!




assembly language

 
Reply to this topicStart new topic

assembly language, need assistance

jrt6
18 Jan, 2008 - 06:36 AM
Post #1

New D.I.C Head
*

Joined: 14 Feb, 2007
Posts: 16


My Contributions
hello,

I have written a very simple assembly language programme, but I am unsure about 1 thing. I need to find out the 16 bit machine code instruction stored at 0x1c. I have tried microchips website but it does not make much sense, this is the program below

; mptest.asm

title "mptest.asm"
list p=18f452, f=inhx32
#include <p18f452.inc>

storea equ h'00'
storeb equ h'01'
storec equ h'02'

TEN equ d'10'
ONE equ d'01'

org 0x00
goto start

org 0x1C

start
movlw TEN
movwf storea
incf storea, f
movf storea, w
movwf storeb
movlw ONE
movwf storec
decf storec, w
loop
goto loop

end

Thanks for your help
User is offlineProfile CardPM
+Quote Post

Nayana
RE: Assembly Language
19 Jan, 2008 - 04:05 AM
Post #2

DIC Hawk - 나야나 नयन:
Group Icon

Joined: 14 Nov, 2007
Posts: 824



Thanked: 5 times
Dream Kudos: 175
My Contributions
'org' is a compiler directive that tells the assembler where the next instruction of code should be. So the 16 bit instruction at 0x1C will be the first instruction after the 'org 0x1C' directive.

This post has been edited by Nayana: 19 Jan, 2008 - 04:06 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/5/08 04:20AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month