
B–61803E–1/10
A. MACRO PROGRAM EXAMPLE
APPENDIX
233
00010 O9502 ; Cursor display
00020 IF [#100 EQ 0] GOTO 900 ;
00030 #145 = #[10000 + [#100-1] * 2] ;
00040 IF [#145 EQ 0] GOTO 900 ; #145: Cursor data head address
00050 #145 = #104 * 8 + #145 ;
00060 #146 = #[#145 + 4] * #[#145+5] ; No. of displays in group
00070 #147 =#[10001 + [#100-1] * 2] ; No. of cursor pointers
00080 IF [#140 EQ 0] GOTO 200 ; No cursor pointer changes
00090 IF [#140 EQ 2] GOTO 100 ; __
00100 #105 = #105 + 1 ; # cursor pointer advances
00110 IF [#105 LT #146] GOTO 200 ;
00120 #105 = 0 ; #105 is pointer No. in group
00130 #104 = #104 +1 ;
00140 #145 = #145 + 8 ;
00150 IF [#104 LT #147] GOTO 200 ;
00160 #104 = 0 ;
00170 #145 = #[10000 + [#100 -1] * 2] + #104 * 8 ;
00180 GOTO 200 ;
00190 N100 #105 = #105 - 1 ; #Cursor pointer moves backward
00200 IF [#105 GE 0] GOTO 200 ;
00210 #104 = #104 - 1 ;
00220 IF [#104 GE 0] GOTO 120 ;
00230 #104 = #147 - 1 ;
00240 N120 #145 = #[10000 + [#100 -1] * 2] + #104 * 8 ;
00250 #105 = #[#145 + 4] * #[#145 + 5] - 1 ;
00260 N200 IF [#[#145 + 7] EQ 1] GOTO 210 ; # When the cursor does not change.
00270 #139 = FIX [#105 / #[#145 + 4]] ;
00280 #148 = #105 - #139 * #[#145 + 4] ;
00290 GOTO 220 ;
00300 N210 #148 = FIX [#105 / #[#145 + 5]] ;
00310 #139 = #105 - #148 * #[#145 + 5] ;
00320 N220 #8505 = 1 ; Cursor display ON
00330 #8506 = #[#145] + #[#145 + 2] * #148 ; Cursor X position
00340 #8507 = #[#145 + 1] + #[#145 + 3] * #139 ; Cursor Y position
00350 N900 M99 ;
00360 ; #140=0 : No cursor pointer changes #100 Cursor control1 No.
00370 ; #140=1 : The cursor pointer moves forward by one. #101
00380 ; #140=2 : The cursor pointer moves backward by one.) #102 Key input control data
00390 ; #103 key input numerical data
00400 ; #104 Cursor pointer
#105 Cursor subpointer
When in the last poinnter is reached
Next group
Return to the begining when coming to the
cursor pointer group end
The cursor pointer moves in the X-direction
in a gruop: #148: X #149: Y
The cursor pointer moves in the Y-
direction in a group.