0

Hello, I want to add 3 digits (1+2+3) together but im getting wiered char instead of the resault. please advice where am i wrong.

comments are added for more information they are not included in pep8 object codes. Thanks.

D1 00 14 ;First number
71 00 16 ;Add the two numbers
71 00 18 ;Add the 3rd number
A1 00 1A ;convert the sum to character
F1 00 13 ;store the character
51 00 13 ;output the character
00       ;stop
00       ;character to output
00 01    ;First#    . 14
00 02    ;Sec#  . mem16hex
00 03    ;3rd#  . mem18hex
00 03    ;mask  . mem1Ahex
zz

Edited by Sepand_1

1
Contributor
1
Reply
11
Views
4 Years
Discussion Span
Last Post by Sepand_1
0
C1 00 14
71 00 16
71 00 18
A1 00 1A
F1 00 13
51 00 13
00
00
00 02
00 0D
00 06
00 30
zz

Its fixed. Problem was my first line. Now i am loading 2 and then adding -3 and then adding 6 wich is giving output 5

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.