Re: [Ktechlab-devel] Assembly programming.

2008-12-08 Thread atay Öztürk
Hi,

You can not just jump and write the assembly code. You first have to 
define the PIC model you are going to use and the properties you wish to 
use and not to.

Here you can find a .tar.gz archive which has a gpasm example in it. Try 
that one and change it accordingly.

http://petertodd.org/tech/example-projects/bin/example-projects-20070527.tar.gz

(http://petertodd.org/tech/example-projects/)

I hope this helps.

Best Regards,

Sadi.

Bryan wrote On 08-12-2008 21:13:
> I am trying to learn Assembly as part of my knowledge of digital 
> circuits. I have a 500 project breadboard kit of which one part has many 
> programs written in assembly. I would like to simulate some of them in 
> ktechlab instead of tedious breadboarding, but they fail to compile. 
> What am I doing wrong? The program which should just increment value by 
> ADD instruction is below along with the error. A
>
> MOV A,#00H
> OUT A
> TM2 #01H
> ADD A,#01H
> JMP L01#
>
> ...
>   


--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Ktechlab-devel mailing list
Ktechlab-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ktechlab-devel


[Ktechlab-devel] Assembly programming.

2008-12-08 Thread Bryan
I am trying to learn Assembly as part of my knowledge of digital 
circuits. I have a 500 project breadboard kit of which one part has many 
programs written in assembly. I would like to simulate some of them in 
ktechlab instead of tedious breadboarding, but they fail to compile. 
What am I doing wrong? The program which should just increment value by 
ADD instruction is below along with the error. A

MOV A,#00H
OUT A
TM2 #01H
ADD A,#01H
JMP L01#




Building: /tmp/kde-stealth/ktechlabnG5Irc.hex
gpasm --output /tmp/kde-stealth/ktechlabnG5Irc.hex --hex-format inhx8m 
--radix DEC --warning 0 --ignore-case --force-list 
/tmp/kde-stealth/ktechlabLTUGNa.asm
/tmp/kde-stealth/ktechlabLTUGNa.asm:1:Error [103] syntax error
/tmp/kde-stealth/ktechlabLTUGNa.asm:2:Error [131] Processor type is 
undefined.
/tmp/kde-stealth/ktechlabLTUGNa.asm:3:Error [131] Processor type is 
undefined.
/tmp/kde-stealth/ktechlabLTUGNa.asm:4:Error [103] syntax error
Error [125] Illegal condition (EOF encountered before END)
Error [103] syntax error
*** Assembly failed ***


I also tried this syntax:

00 MOV A,#00H
01 OUT A
02 TM2 #01H
03 ADD A,#01H
04 JMP L01#
ENDP


which I get less errors but still failure.

Building: /tmp/kde-stealth/ktechlab4tb4nb.hex
gpasm --output /tmp/kde-stealth/ktechlab4tb4nb.hex --hex-format inhx8m 
--radix DEC --warning 0 --ignore-case --force-list 
/tmp/kde-stealth/ktechlabJCPllb.asm
/tmp/kde-stealth/ktechlabJCPllb.asm:1:Error [103] syntax error
Error [125] Illegal condition (EOF encountered before END)
*** Assembly failed ***


Thanks,
Bryan


--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Ktechlab-devel mailing list
Ktechlab-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ktechlab-devel