mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-11-22 04:31:30 +00:00
106 lines
3.6 KiB
Plaintext
106 lines
3.6 KiB
Plaintext
;
|
|
; File: MENUS.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
|
|
|
|
newmenu 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.w 14(sp),-(sp) ; push copy of first parameter
|
|
move.l 18(sp),-(sp) ; push copy of second parameter
|
|
jsr c2pstr ; convert to Pascal string
|
|
dc.w $A931 ; trap to newmenu
|
|
move.l 16(sp),-(sp) ; push copy of second 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
|
|
|
|
appendmenu 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 $A933 ; trap to appendmenu
|
|
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
|
|
|
|
menuselect proc EXPORT
|
|
move.l d2,-(sp) ; save register d2
|
|
clr.l -(sp) ; reserve space for result
|
|
move.l 12(sp),a0 ; load address of first parameter
|
|
move.l (a0),-(sp) ; push value of first parameter
|
|
dc.w $A93D ; trap to menuselect
|
|
move.l (sp)+,d0 ; load result
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
|
|
setmenuitemtext proc EXPORT
|
|
export setitem ; obsolete old procedure name
|
|
import c2pstr ; c2pstr(s) char *s;
|
|
import p2cstr ; p2cstr(s) char *s;
|
|
setitem move.l d2,-(sp) ; save register d2
|
|
move.l 8(sp),-(sp) ; push copy of first parameter
|
|
move.w 18(sp),-(sp) ; push copy of second parameter
|
|
move.l 22(sp),-(sp) ; push copy of third parameter
|
|
jsr c2pstr ; convert to Pascal string
|
|
dc.w $A947 ; trap to setitem
|
|
move.l 16(sp),-(sp) ; push copy of third paramter
|
|
jsr p2cstr ; convert back to C string
|
|
add.w #4,sp ; balance stack
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
|
|
getmenuitemtext proc EXPORT
|
|
export getitem ; obsolete old procedure name
|
|
import c2pstr ; c2pstr(s) char *s;
|
|
import p2cstr ; p2cstr(s) char *s;
|
|
getitem move.l d2,-(sp) ; save register d2
|
|
move.l 8(sp),-(sp) ; push copy of first parameter
|
|
move.w 18(sp),-(sp) ; push copy of second parameter
|
|
move.l 22(sp),-(sp) ; push copy of third parameter
|
|
dc.w $A946 ; trap to getitem
|
|
move.l 16(sp),-(sp) ; push copy of third paramter
|
|
jsr p2cstr ; convert back to C string
|
|
add.w #4,sp ; balance stack
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
|
|
insertmenuitem proc EXPORT
|
|
export insmenuitem ; obsolete old procedure name
|
|
import c2pstr ; c2pstr(s) char *s;
|
|
import p2cstr ; p2cstr(s) char *s;
|
|
insmenuitem 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
|
|
move.w 26(sp),-(sp) ; push copy of 3rd param, cvt to 2byte
|
|
dc.w $A826 ; insmenuitem
|
|
move.l 12(sp),-(sp) ; 2nd param, cvt back to cstr
|
|
jsr p2cstr
|
|
add #4,sp ; cleanup after p2cstr
|
|
move.l (sp)+,d2 ; restore register d2
|
|
rts
|
|
END
|