[Ktechlab-devel] Assembly programming.

Bryan BTaylor2032 at cfl.rr.com
Mon Dec 8 19:13:11 UTC 2008


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#

<convert to hex>


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





More information about the Ktechlab-devel mailing list