
A. MACRO PROGRAM EXAMPLE
B–61803E–1/10
APPENDIX
194
00010 O0020 ; Cursor test
00020 G202 P3 ;
00030 #8505=0 ; Cursor display none
00040 #8502=0 ; key input none
00050 N008 G243 X0 Y1 (CURSOR TEST -- MOVE CURSOR --) ; Title display
00060 G243 X0 Y3 (A) ;
00070 G243 X0 Y4 (B) ;
00080 G243 X0 Y5 (C) ;
00090 G243 X0 Y6 (D) ;
00100 G243 X0 Y7 (E) ;
00110 G243 X0 Y8 (F) ;
00120 #143=100
00130 M98 P0011 ;
00140 #100=0 ; Pointer for cursor display posotion
00150 #8506=2 ; Cursor position in X-axis direction
00160 N001 #142=#8501 ; SAVE key input control variable.
00170 IF [#142 EQ 0] GOTO 3 ; Key input presence or absence judgment
00180 IF [#142 NE 3] GOTO 2 ; Pointer +1 for cursor #
00190 #100=#100+1 ;
00200 N002 IF [#142 NE 4] GOTO 3 ; Pointer –1 for cursor "
00210 #100=#100-1 ;
00220 N003 #100=#100+6 ;
00230 #100=#100-[FIX [#100/6]]*6 ;
00240 #8507=#100+3 ; Actual Y-axis cusor posotion
00250 #8505=1 ; Cursor display ON
00260 N099 IF [#142 NE 16] GOTO 97 ; Return to the menu after a push on the END key.
00270 N098 #8500=1 ;
00280 M99 ;
00290 N097 M99 P1 ;
00300 ;
00310 ;
00320 ;
00330 ;
00340 ;
The menu for cursor is displayed
Soft key display
Pointer posotion calculation