P
P
pgamesorg2016-12-15 13:37:32
assembler
pgamesorg, 2016-12-15 13:37:32

How to write to EEPROM?

If the 5th bit in the sum of bytes is 1, then write to port B.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
1
15432, 2016-12-15
@15432

The description is not detailed enough - what architecture, what to write to the port, where it is located, what is the difficulty, etc.
Well, for example, the PowerPC code:
li r4, source_data_address-4
li r5, data_size
mtctr r5
li r6, 0
read_loop:
lbzu r3, 4(r4) //read byte by byte and sum
add r6, r6, r3
bdnz read_loop
andi r3, r6, 0x10 //check fifth bit
beq skip_write
li r4, portb_address
stw r6, 0(r4) //write sum to port address
skip_write:
blr

A
Artur Karapetyan, 2017-04-29
@GeorgeGeorge

Let's start with the fact that design elements should not be indented (menu item Benefits) And throw off the code on the codepen. And throw off the screen of that, it turns out in the browser

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question