| instruction |
parameters |
description |
operation |
flags |
| ptstr2s |
(B)a, (W)offset, (W)lng |
Compare String to Receive Frame |
for(i=0;i<lng;i++)(B)@a[i]-(B)@receive[offset+i]) |
zflag |
| ptstr2e |
(B)e, (W)offset, (W)lng |
Compare eepromString to Receive Frame |
for(i=0;i<lng;i++)(B)@e[i]-(B)@receive[offset+i]) |
zflag |
| pr2s |
(B)a, (W)offset, (W)lng |
Copy from Receive Frame to String |
for(i=0;i<lng;i++)(B)@a[i]=(B)@receive[offset+i]) |
|
| px2s |
(B)a, (W)offset, (W)lng |
Copy from Xmit Frame to String |
for(i=0;i<lng;i++)(B)@a[i]=(B)@receive[offset+i]) |
|
| pi2x |
(W)offset, (W)imm |
Mov Word Immediate to Xmit Frame |
(W)@xmit[offset]=(W)imm |
|
| ps2x |
(W)offset, (B)a, (W)lng |
Mov String to Xmit Frame |
for(i=0;i<lng;i++)(B)@xmit[offset+i]=(B)@a[i]) |
|
| pe2x |
(W)offset, (B)e, (W)lng |
Mov eepromString to Xmit Frame |
for(i=0;i<lng;i++)(B)@xmit[offset+i]=(B)@e[i]) |
|
| pc2x |
(W)offset, (B)c, (W)lng |
Mov codeString to Xmit Frame |
for(i=0;i<lng;i++)(B)@xmit[offset+i]=(B)@c[i]) |
|
| pz2x |
(W)offset, (W)lng |
Mov Zero to Xmit Frame |
for(i=0;i<lng;i++)(B)@xmit[offset+i]=0) |
|
| pr2x |
(W)xmit_offset, (W)receive_offset, (W)lng |
Mov Receive Frame to Xmit Frame |
for(i=0;i<lng;i++)(B)@xmit[xmit_offset+i]=@receive[receive_offset+i]) |
|
Similarly to pr2x, instruction psendchar does not write data directly into the Ethernet controller
but uses buffer ebuf. Buffer is controlled by two global variables: tcpWritePointer contains offset
in the xmit frame where data will be stored, and is automatically incremented as the data are copied from ebuf
to the xmit frame. unwrited contains offset in ebuf; however, the actual offset is tcpWritePointer +
unwrited. Before the first call to psendchar, both variables must be initialized -
correct offset stored into tcpWritePointer and unwrited set to 0.
It is necessary to call bflush after writing data with psendchar.