Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. // Message structure: 16 bytes in total
  2. struct ipc_message {
  3. unsigned char from;
  4. unsigned char to;
  5. unsigned char priority;
  6. unsigned char sequence;
  7. unsigned char[12] message;
  8. };
  9. struct ipc_message[1] ipc_buffer;
  10. struct ipc_message *ipc_read() {
  11. enable_syscalls();
  12. *(unsigned char *)$D649 = $00;
  13. asm { nop }
  14. // Copy returned structure in to return buffer
  15. unsigned char *a=(unsigned char *)ipc_buffer;
  16. unsigned char *b=(unsigned char *)$0300;
  17. for(unsigned char i=0;i<16;i++) a[i]=b[i];
  18. // Return address of return buffer
  19. return ipc_buffer;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement