mac-rom/Libs/InterfaceSrcs/DESK.a
Elliot Nunn 4325cdcc78 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-12-26 09:52:23 +08:00

35 lines
962 B
Plaintext

include 'macintosh.a'
; desk.a
;
; Copyright Apple Computer, Inc. 1984, 1985
; All rights reserved.
BLANKS ON
STRING ASIS
opendeskacc proc EXPORT
import c2pstr ; c2pstr(s) char *s;
import p2cstr ; p2cstr(s) char *s;
move.l d2,-(sp) ; save register d2
clr.w -(sp) ; reserve space for result
move.l 10(sp),a0 ; copy of first parameter
move.l a0,-(sp) ; push copy of first parameter
addq.b #1,(a0) ; increment the first byte
jsr c2pstr ; convert to Pascal string
move.l d0,a0 ; copy of first parameter
subq.b #1,1(a0) ; decrement the first byte
dc.w $A9B6 ; trap to opendeskacc
move.l 10(sp),-(sp) ; push copy of first paramter
jsr p2cstr ; convert back to C string
add.w #4,sp ; balance stack
move.w (sp)+,d0 ; load result
ext.l d0 ; extend result to long
move.l (sp)+,d2 ; restore register d2
rts
END