487 |
|
} |
488 |
|
|
489 |
|
// Add new data to clipboard |
490 |
< |
static uint8 proc[] = { |
491 |
< |
0x59, 0x8f, // subq.l #4,sp |
492 |
< |
0xa9, 0xfc, // ZeroScrap() |
493 |
< |
0x2f, 0x3c, 0, 0, 0, 0, // move.l #length,-(sp) |
494 |
< |
0x2f, 0x3c, 0, 0, 0, 0, // move.l #type,-(sp) |
495 |
< |
0x2f, 0x3c, 0, 0, 0, 0, // move.l #outbuf,-(sp) |
496 |
< |
0xa9, 0xfe, // PutScrap() |
497 |
< |
0x58, 0x8f, // addq.l #4,sp |
498 |
< |
M68K_RTS >> 8, M68K_RTS |
490 |
> |
static uint16 proc[] = { |
491 |
> |
PW(0x598f), // subq.l #4,sp |
492 |
> |
PW(0xa9fc), // ZeroScrap() |
493 |
> |
PW(0x2f3c), 0, 0, // move.l #length,-(sp) |
494 |
> |
PW(0x2f3c), 0, 0, // move.l #type,-(sp) |
495 |
> |
PW(0x2f3c), 0, 0, // move.l #outbuf,-(sp) |
496 |
> |
PW(0xa9fe), // PutScrap() |
497 |
> |
PW(0x588f), // addq.l #4,sp |
498 |
> |
PW(M68K_RTS) |
499 |
|
}; |
500 |
< |
uint32 proc_area = (uint32)proc; // FIXME: make sure 32-bit relocs are used |
500 |
> |
uint32 proc_area = (uint32)proc; |
501 |
|
WriteMacInt32(proc_area + 6, data.size()); |
502 |
|
WriteMacInt32(proc_area + 12, type); |
503 |
|
WriteMacInt32(proc_area + 18, scrap_area); |