Welcome to Dream.In.Code
Getting Help is Easy!

Join 105,763 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,700 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Need help with Assembly language

 
Reply to this topicStart new topic

Need help with Assembly language, PIC assembly with MPLab

bremy51
post 2 Jun, 2008 - 04:28 AM
Post #1


New D.I.C Head

*
Joined: 2 Jun, 2008
Posts: 2

CODE

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

stores        equ      h’00’                     ; the value of stores
storee        equ      h’01’
count        equ      d’04’                      

        org   0x00    ; reset vector address
        goto start

        org   0x1C    ; Program start address
start
        movlw  count; move count as a number to WREG
        movwf  count; move the data in WREG to f Register count
        movlw  stores
        movwf  storee
test        
        movlw  stores
        movwf  stores
        movf     storee, w; move the data in f Register store to WREG
        incf       stores, f; increase the data in f Register stores
        incf       storee, f
decfsz  count; decrease the data in f Register count. If it
goto  test    ; equal to 0, jump next instruction
loop
goto  loop
end


Hey Ive done this code in the mplab programme but I dont know how to find the values stored in count, stores and storee. Could someone please help me find the values. All help is much appreciated. Thanks

This post has been edited by NickDMax: 3 Jun, 2008 - 07:35 AM
User is offlineProfile CardPM

Go to the top of the page


jjsaw5
post 2 Jun, 2008 - 05:02 AM
Post #2


D.I.C. Face

Group Icon
Joined: 4 Jan, 2008
Posts: 918



Thanked 5 times

Dream Kudos: 125
My Contributions


please use [code] tags when posting code from now on. Thank you.
User is online!Profile CardPM

Go to the top of the page

bremy51
post 2 Jun, 2008 - 05:20 AM
Post #3


New D.I.C Head

*
Joined: 2 Jun, 2008
Posts: 2

sorry about that I am a Noob
User is offlineProfile CardPM

Go to the top of the page

NickDMax
post 3 Jun, 2008 - 07:26 AM
Post #4


2B||!2B

Group Icon
Joined: 18 Feb, 2007
Posts: 2,672



Thanked 26 times

Dream Kudos: 475
My Contributions


It helps to know what platform you are on and what assembler you are using.

I for one do not recognize the assembly language that you are using. I don't see any registers. It does not look like any IA86 based assembly (NASM, MASM, or TASM).

Ah, didn't see the mplab bit (well actually I dismissed it as matlab).

What pic are you programming this for?

You will want to add that info to your title/description of your post so that experts in that area will be attracted to your post.

This post has been edited by NickDMax: 3 Jun, 2008 - 07:29 AM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/21/08 01:42PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month