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

123 lines
4.5 KiB
Plaintext

;
; File: CONTROLS.a
;;
; Copyright: © 1984-1992 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <2> 7/6/92 DCL Added Support for new synonyms.
;
;
include 'macintosh.a'
BLANKS ON
STRING ASIS
newcontrol proc EXPORT
import c2pstr ; c2pstr(s) char *s;
import p2cstr ; p2cstr(s) char *s;
move.l d2,-(sp) ; save register d2
clr.l -(sp) ; reserve space for result
move.l 12(sp),-(sp) ; push copy of first parameter
move.l 20(sp),-(sp) ; push copy of second parameter
move.l 28(sp),-(sp) ; push copy of third parameter
jsr c2pstr ; convert to Pascal string
move.b 39(sp),-(sp) ; push copy of fourth parameter
move.w 44(sp),-(sp) ; push copy of fifth parameter
move.w 50(sp),-(sp) ; push copy of sixth parameter
move.w 56(sp),-(sp) ; push copy of seventh parameter
move.w 62(sp),-(sp) ; push copy of eighth parameter
move.l 66(sp),-(sp) ; push copy of ninth parameter
dc.w $A954 ; trap to newcontrol
move.l 20(sp),-(sp) ; push copy of third paramter
jsr p2cstr ; convert back to C string
add.w #4,sp ; balance stack
move.l (sp)+,d0 ; load result
move.l (sp)+,d2 ; restore register d2
rts
setcontroltitle proc EXPORT
export setctitle ; obsolete old procedure name
import c2pstr ; c2pstr(s) char *s;
import p2cstr ; p2cstr(s) char *s;
setctitle ; obsolete old procedure name
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 $A95F ; trap to setctitle
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
getcontroltitle proc EXPORT
export getctitle ; obsolete old procedure name
import c2pstr ; c2pstr(s) char *s;
import p2cstr ; p2cstr(s) char *s;
getctitle ; obsolete old procedure name
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
dc.w $A95E ; trap to getctitle
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
testcontrol proc EXPORT
move.l d2,-(sp) ; save register d2
clr.w -(sp) ; reserve space for result
move.l 10(sp),-(sp) ; push copy of first parameter
move.l 18(sp),a0 ; load address of second parameter
move.l (a0),-(sp) ; push value of second parameter
dc.w $A966 ; trap to testcontrol
move.w (sp)+,d0 ; load result
ext.l d0 ; extend result to long
move.l (sp)+,d2 ; restore register d2
rts
findcontrol proc EXPORT
move.l d2,-(sp) ; save register d2
clr.w -(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
move.l 26(sp),-(sp) ; push copy of third parameter
dc.w $A96C ; trap to findcontrol
move.w (sp)+,d0 ; load result
ext.l d0 ; extend result to long
move.l (sp)+,d2 ; restore register d2
rts
trackcontrol proc EXPORT
move.l d2,-(sp) ; save register d2
clr.w -(sp) ; reserve space for result
move.l 10(sp),-(sp) ; push copy of first parameter
move.l 18(sp),a0 ; load address of second parameter
move.l (a0),-(sp) ; push value of second parameter
move.l 26(sp),-(sp) ; push copy of third parameter
dc.w $A968 ; trap to trackcontrol
move.w (sp)+,d0 ; load result
ext.l d0 ; extend result to long
move.l (sp)+,d2 ; restore register d2
rts
dragcontrol 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
move.l 32(sp),-(sp) ; push copy of fourth parameter
move.w 42(sp),-(sp) ; push copy of fifth parameter
dc.w $A967 ; trap to dragcontrol
move.l (sp)+,d2 ; restore register d2
rts
END