IPB

Witaj Gościu ( Zaloguj | Rejestruj )



asembler, pierwszy program
post 03.10.2006 - 15:01
Post #1





Grupa:
Postów: 0
Dołączył: --
Nr użytkownika: 0

Ostrzeżenie: (0%) -----


Dziś mieliśmy zajęcia z programowania :? . Tym razem będzie asembler.
Prowadzący wypisał na tablicy program

Kod
#include <P16F84.inc>

LIST p=16F84

R1 eqn 0x20

R2 eqn 0x21

wynikL eqn 0x22

wynikH eqn 0x23



movlw 0x0F

movwf R1

movlw 0xCB

movwf R2

addwf R1w

btfsc STATUS

incf wynik H,f

movwf wynikL

end


Sciągnąłem kompilator MPASM skompilowałem i dostałem kupę errorów

Cytat
Warning[205] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 2 : Found directive in column 1. (LIST)
Error[122]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 3 : Illegal opcode (eqn)
Error[122]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 4 : Illegal opcode (eqn)
Error[122]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 5 : Illegal opcode (eqn)
Error[122]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 6 : Illegal opcode (eqn)
Warning[203] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 8 : Found opcode in column 1. (movlw)
Warning[203] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 9 : Found opcode in column 1. (movwf)
Error[113]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 9 : Symbol not previously defined (R1)
Warning[203] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 10 : Found opcode in column 1. (movlw)
Warning[203] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 11 : Found opcode in column 1. (movwf)
Error[113]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 11 : Symbol not previously defined (R2)
Warning[203] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 12 : Found opcode in column 1. (addwf)
Message[305] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 12 : Using default destination of 1 (file).
Error[113]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 12 : Symbol not previously defined (R1w)
Warning[203] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 13 : Found opcode in column 1. (btfsc)
Error[128]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 13 : Missing argument(s)
Warning[203] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 14 : Found opcode in column 1. (incf)
Error[113]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 14 : Symbol not previously defined (wynik)
Error[113]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 14 : Symbol not previously defined (H)
Error[112]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 14 : Missing operator
Warning[203] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 15 : Found opcode in column 1. (movwf)
Error[113]   E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 15 : Symbol not previously defined (wynikL)
Warning[205] E:MOJE DOKUMENTYLABORKASEMVIIPROBA.TXT 16 : Found directive in column 1. (end)


Eqn jest illegal. Moje pytani brzmi co jest legal i czym zastąpić eqn ?

[size=9][Zmoderowane @Guardian] Temat przeniesiony: Programowanie -> Assembler
Go to the top of the page
 
+Quote Post

Posty w temacie
_maniak_   asembler, pierwszy program   03.10.2006 - 15:01


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



Wersja Lo-Fi Aktualny czas: 08.09.2010 - 23:30