supermario/base/SuperMarioProj.1994-02-09/Libs/InterfaceSrcs/QUICKDRAW.a
2019-06-29 23:17:50 +08:00

169 lines
5.8 KiB
Plaintext

include 'macintosh.a'
; quickdraw.a
;
; Copyright Apple Computer, Inc. 1984-1988
; All rights reserved.
;
; Modifications:
; 11 Feb 88 KLH Changed C headers to work with new C compiler:
; Changed to using standard glue in Interface.o, so
; much glue removed from CInterface.o.
; *** MPW 3.0d4 ***
BLANKS ON
STRING ASIS
drawstring proc EXPORT
import c2pstr ; c2pstr(s) char *s;
import p2cstr ; p2cstr(s) char *s;
move.l d2,-(sp) ; save register d2
move.l 8(sp),-(sp) ; push copy of first parameter
jsr c2pstr ; convert to Pascal string
dc.w $A884 ; trap to drawstring
move.l 8(sp),-(sp) ; push copy of first paramter
jsr p2cstr ; convert back to C string
add.w #4,sp ; balance stack
move.l (sp)+,d2 ; restore register d2
rts
stringwidth 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),-(sp) ; push copy of first parameter
jsr c2pstr ; convert to Pascal string
dc.w $A88C ; trap to stringwidth
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
ptinrect proc EXPORT
move.l d2,-(sp) ; save register d2
clr.b -(sp) ; reserve space for result
move.l 10(sp),a0 ; load address of first parameter
move.l (a0),-(sp) ; push value of first parameter
move.l 18(sp),-(sp) ; push copy of second parameter
dc.w $A8AD ; trap to ptinrect
move.b (sp)+,d0 ; load result
ext.w d0 ; extend result to word
ext.l d0 ; extend result to long
move.l (sp)+,d2 ; restore register d2
rts
pt2rect proc EXPORT
move.l d2,-(sp) ; save register d2
move.l 8(sp),a0 ; load address of first parameter
move.l (a0),-(sp) ; push value of first parameter
move.l 16(sp),a0 ; load address of second parameter
move.l (a0),-(sp) ; push value of second parameter
move.l 24(sp),-(sp) ; push copy of third parameter
dc.w $A8AC ; trap to pt2rect
move.l (sp)+,d2 ; restore register d2
rts
pttoangle proc EXPORT
move.l d2,-(sp) ; save register d2
move.l 8(sp),-(sp) ; push copy of first parameter
move.l 16(sp),a0 ; load address of second parameter
move.l (a0),-(sp) ; push value of second parameter
move.l 24(sp),-(sp) ; push copy of third parameter
dc.w $A8C3 ; trap to pttoangle
move.l (sp)+,d2 ; restore register d2
rts
ptinrgn proc EXPORT
move.l d2,-(sp) ; save register d2
clr.b -(sp) ; reserve space for result
move.l 10(sp),a0 ; load address of first parameter
move.l (a0),-(sp) ; push value of first parameter
move.l 18(sp),-(sp) ; push copy of second parameter
dc.w $A8E8 ; trap to ptinrgn
move.b (sp)+,d0 ; load result
ext.w d0 ; extend result to word
ext.l d0 ; extend result to long
move.l (sp)+,d2 ; restore register d2
rts
addpt proc EXPORT
move.l d2,-(sp) ; save register d2
move.l 8(sp),a0 ; load address of first parameter
move.l (a0),-(sp) ; push value of first parameter
move.l 16(sp),-(sp) ; push copy of second parameter
dc.w $A87E ; trap to addpt
move.l (sp)+,d2 ; restore register d2
rts
subpt proc EXPORT
move.l d2,-(sp) ; save register d2
move.l 8(sp),a0 ; load address of first parameter
move.l (a0),-(sp) ; push value of first parameter
move.l 16(sp),-(sp) ; push copy of second parameter
dc.w $A87F ; trap to subpt
move.l (sp)+,d2 ; restore register d2
rts
equalpt proc EXPORT
move.l d2,-(sp) ; save register d2
clr.b -(sp) ; reserve space for result
move.l 10(sp),a0 ; load address of first parameter
move.l (a0),-(sp) ; push value of first parameter
move.l 18(sp),a0 ; load address of second parameter
move.l (a0),-(sp) ; push value of second parameter
dc.w $A881 ; trap to equalpt
move.b (sp)+,d0 ; load result
ext.w d0 ; extend result to word
ext.l d0 ; extend result to long
move.l (sp)+,d2 ; restore register d2
rts
stuffhex proc EXPORT
import c2pstr ; c2pstr(s) char *s;
import p2cstr ; p2cstr(s) char *s;
move.l d2,-(sp) ; save register d2
move.l 8(sp),-(sp) ; push copy of first parameter
move.l 16(sp),-(sp) ; push copy of second parameter
jsr c2pstr ; convert to Pascal string
dc.w $A866 ; trap to stuffhex
move.l 12(sp),-(sp) ; push copy of second paramter
jsr p2cstr ; convert back to C string
add.w #4,sp ; balance stack
move.l (sp)+,d2 ; restore register d2
rts
stdtext proc EXPORT
move.l d2,-(sp) ; save register d2
move.w 10(sp),-(sp) ; push copy of first parameter
move.l 14(sp),-(sp) ; push copy of second parameter
move.l 22(sp),a0 ; load address of third parameter
move.l (a0),-(sp) ; push value of third parameter
move.l 30(sp),a0 ; load address of fourth parameter
move.l (a0),-(sp) ; push value of fourth parameter
dc.w $A882 ; trap to stdtext
move.l (sp)+,d2 ; restore register d2
rts
stdline proc EXPORT
move.l d2,-(sp) ; save register d2
move.l 8(sp),a0 ; load address of first parameter
move.l (a0),-(sp) ; push value of first parameter
dc.w $A890 ; trap to stdline
move.l (sp)+,d2 ; restore register d2
rts
; Ptr GetMaskTable();
;;GetMaskTable proc export
;; _GetMaskTable
;; move.l a0,d0
;; rts
END