Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

8052 assembler not working

Hello everyone,

 

When trying to build, an assembler code for the 8052 I get this error:


main.asm
Errors: main.asm
No listing file generated by assembler. (Invalid $INCLUDE directive? Semi-colon after $MOD directive?)
Assembler results: 1 - Errors, 0 - Warnings

 

The code is correct because it works fine in other devices, I already tried unistaling and installing again Multisim with no result.

 

Anybody has an idea on how to solve it?

 

Thanks in advance.

 

 

PS: In case is useful, im pasting the code here.

 

$MOD52  ; This includes 8052 definitions for the Metalink assembler

; Please insert your code here.


ORG 0000H

ORG 0033H

 

INICIO: CLR P2.0
SETB 20H.0 SALTO1: NOP
NOP
NOP

JB P1.0, SALTO1

JB 20H.0, APAGAR

CLR P2.0
SETB 20H.0
JMP SALTO1

 

APAGAR: SETB P2.0
CLR 20H.0
JMP SALTO1

END

 

0 Kudos
Message 1 of 2
(1,268 Views)

 

Hi Carmyex,

 

 

First I have to make a remark that the error message is about two ASSEMBLER CONTROLS/DIRECTIVES ($INCLUDE and $MOD) but combined in only one error count.

 

No listing file generated by assembler. (Invalid $INCLUDE directive? Semi-colon after $MOD directive?)
Assembler results: 1 - Errors, 0 - Warnings


There is no $INCLUDE assembler control/directive in the code that you posted. If you missed copying some parts of your code, you can insert it in your reply. On the other hand, it is also possible that the "Invalid $INCLUDE directive?" message was just induced by the "$MOD" assembler control/directive.


The main problem that I can infer from your post is that the code is written for the MetaLink Cross Assembler but the Development / Code Generation Tools that you are using employs a different assembler. The Metalink Cross Assembler does not classify $INCLUDE and $MOD52 as part of its ASSEMBLER DIRECTIVES (e.g., ORG, EQU). Instead, $INCLUDE and $MOD52 are part of Metalink's ASSEMBLER CONTROLS. Notice that the error message used the term directive for $INCLUDE and $MOD.

 

No listing file generated by assembler. (Invalid $INCLUDE directive? Semi-colon after $MOD directive?)


Try replacing the line

 

$MOD52 ; This includes 8052 definitions for the Metalink assembler

 

with

 

; This includes 8052 definitions for the Metalink assembler
$MOD52


If the assembler still issues errors about this line, comment out the line containing the $MOD52 assembler control/directive

 

from

 

$MOD52 ; This includes 8052 definitions for the Metalink assembler

 

to

 

;$MOD52 ; This includes 8052 definitions for the Metalink assembler

 

Your code might be successfully assembled without the need for the $MOD52 control/directive especially if you are using a newer Development / Code Generation Tools.

 

 

 

Best regards,

 

G. Goodwin

 

0 Kudos
Message 2 of 2
(1,116 Views)