supermario/base/SuperMarioProj.1994-02-09/Libs/InterfaceSrcs/DESK.a
2019-06-29 23:17:50 +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