Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ASCII PARITY Encoder

Status
Not open for further replies.
What Mr T is saying is Don't care is usually a little "x"

Ie.. x1111111 = 0x7F.

this is how we wrote [A]<-[A]^7F Which is ANI 7F
That means the instruction ANDS the [A] with the 7F
A is EOT and we found the value of A from the ASCII code table.
which is 0100 in hex 4
 
Last edited:
'A' is 0b01000001 in binary form (ASCII).
 
this is the ASCII code we are using
A=EOT=04 0000 0100
 

Attachments

  • photo(3).JPG
    photo(3).JPG
    2.2 MB · Views: 136
as it was mentioned in the instruction we start with 2000 goes to HL
so [Hl]<-[2000]
then we move whatever pointed by HL to A
so [a]<-[[HL]]
 
this is what we started with
2000 through 2009 is Data Field
200A EOT
200B C
200C O
200D D
200E E
200F BLank
2010 BLank
2011 BLank
2012 BLank
2013 F
2014 A
2015 I
2016 L
 
Last edited:
Am I the only one missing the point of this whole thread? It started with your requirement to check parity in 7-bit ASCII characters, then there was some confusion about Don´t care status of the 8th bit, and now something that looks like a completely unrelated listing of a piece of memory. What is going on in here?
 
sorry if I wasn't clear with my question
I have to create program of an Even 7bit ASCII Parity encoder using the Intel SDK 85
so 1st I have to come with flow chart
 
Flow chart? like 7bits-> [parity generator] -> 8bits ?
Or do you really need to present a flowchart for xoring 7 bits together? Ok fitting it to the instrucion architecture is a bit more complicated than that, but typically you would do a right shift of the byte, so that the last bit moves into the flag register, and based on that flag you invert some other register, repeat 7 times. After that you might need to do a negation, depending on it being odd or even parity. At least I think this should be possible on this processor.
 
Scratch that, the flag register has a parity bit, so you should be able to just Or 0xf0 to the result based on that bit.
Code:
;<Program title>

jmp start

;data


;code
start: mvi B, 56;set number
mov A, B;move to acc
jpe even ;compare, parity bit set if even
odd: ori 128 ;add 8th bit here
even: nop ;or here


hlt
 
Last edited:
Scratch that, the flag register has a parity bit, so you should be able to just Or 0xf0 to the result based on that bit.
Code:
;<Program title>

jmp start

;data


;code
start: mvi B, 56;set number
mov A, B;move to acc
jpe even ;compare, parity bit set if even
odd: ori 128 ;add 8th bit here
even: nop ;or here


hlt

thanks for your help
This is what I did so far
 

Attachments

  • photo(1).JPG
    photo(1).JPG
    879.6 KB · Views: 138
And what is that supposed to do, exactly?

As we were supposed to started with 2000 goes to HL
then what ever pointed by HL goes to A
[HL]<-[2000]
[A]<-[[HL]]
IF A=04 we display Code/Blank
If no then we move 04 to A
Then if A=L we display Fail/Blank
if A is not equal to L then we increase HL by 1 [Hl]<-[HL]+1
then move whatever pointed by HL goes to A, that is [A]<-[[HL]]
Since A=04 by this condition we encode the program
then Display Code and then End it
 
That is what the flowchard shows, but it is not what I asked. I wanted to know what is the task to be done? Why is that number 2000? Why the other number 04? Tell us the whole picture please.
 
That is what the flowchard shows, but it is not what I asked. I wanted to know what is the task to be done? Why is that number 2000? Why the other number 04? Tell us the whole picture please.

the instrcution said
the first byte (Data) file is located at memory location 2000 (RAM)

we found A to be 04 from ASCII code chart
 

Attachments

  • photo(2).JPG
    photo(2).JPG
    1.2 MB · Views: 175
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top