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
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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.