Wow, I was sure that I included that opcode in my opcode list and on the hexcodes page, but apparently I didn't o.o The hex code is:
AsmPrgmEFD74AEFEF4A323F84C9
Store the key press to simulate in Ans and run the program. The key codes are not the same as they are in BASIC (these are assembly keycodes). Key code documentation is:
I guess if you add 56, it is like using the 2nd button and if you
add another 56, it is like pressing alpha
01 Down
02 Left
03 Right
04 Up
09 Enter
10 +
11 -
12 *
13 /
14 ^
15 Clear
17 (-)
18 3
19 6
20 9
21 )
22 tan(
23 vars
25 .
26 2
27 5
28 8
29 (
30 cos(
31 prgm
32 Stat
33 0
34 1
35 4
36 7
37 ,
38 sin(
39 APPS
40 XTON
42 sto>
43 ln(
44 log(
45 X^2
46 X^-1
47 Math
48 Alpha
49 graph
50 trace
51 zoom
52 window
53 Y=
54 2nd
55 mode
56 delete
255 [2nd][On]
254 [prgm][enter] displays prgmA (Even if it doesn't exist)
253 [2nd][Stat]
252 Displays LA (list A)
251 Disp If
250 [Graph]
249 Catalog
248 nothing
247 Same as FE
246 RAM Clear
Unfortunately, you cannot do this from inside a program, unless you are exiting a program. So to force the APP menu to open upon finishing your program, put 39:Asm(prgmKEYSIM at the end of your program. I made that code years ago, so I bet with some complicated code I could make it simulate a list of keypresses.
EDIT: Fixed the opcode, I put one too many EFs in there.