📄 basic_fn.med
字号:
1168 ;V3.00acc_plus_tx1: ;V1.19|
1169 ;V3.00 ld (KEYIN),K_TXP ;V1.19|
1170 ;V3.00 jp tax_plus_a ;V1.19/v2.19
1171 ;V2.19 jp tax_plus_x ;V2.18
1172 ;------------------------------------------------------- above for V15 logic
1173 acc_plus_x: ;V1.19
1174 ;V4.12 @BBS (EURO_PROG,eurate_plus_key) ;\is euro rate setting mode?
1176 +1 ld wa,RATE_PROG
1177 +1 test (RATE_PROG>>4).a ;bit -reverse-> jump status
1178 +1 j f,no_operation ;if jump status is 0 -> branch
1179 acc_plus_y: ;V1.16
1180 ;V4.01 @BBC (SW_SGT,acc_plus01) ;V1.17 [+]/[-] have function for [+=]/[-=]?
1181 ;-------------------------------------------------------------------
1182 acc_plus_z:
1183 ;V4.01 ld a,(FLG_E) ;V1.17
1184 ;V4.01 and a,0y00000011 ;V1.17check E_MUL,E_DIV flags
1185 ;V4.01 j nz,acc_plus000 ;V1.17
1186 ;V4.01 @BBS (F_PEREXE,acc_plus01) ;V1.24
1187 ;V4.01 @BBC (SW_SGK,acc_plus01) ;V1.19
1188 ;V4.01 ld a,(FLG_C) ;V1.19
1189 ;V4.01 and a,0y00000011 ;V1.19
1190 ;V4.01 j z,acc_plus01 ;V1.19
1191 ;V4.01acc_plus000:
1192 ;V4.01 @BBC (E_MUP,acc_plus00001) ;V1.24
1193 ;V4.01 call equal_mup ;V1.24
1194 ;V4.01 jp acc_plus00099 ;V1.24
1195 ;V4.01acc_plus00001: ;V1.24
1196 ;V4.01 @BBC (E_DLT,acc_plus00002) ;V1.24
1197 ;V4.01 call equal_dlt ;V1.24
1198 ;V4.01 jp acc_plus00099 ;V1.24
1199 ;V4.01acc_plus00002: ;v1.24
1200 ;V4.01 call equal_sub ;V1.17
1201 ;V4.01 ld (FLG_C),0
1202 ;V4.01acc_plus00099:
1203 ;V4.01 @BBS (F_CALER,acc_plus29) ;V1.17if error occured? yes->
1204 ;V4.01 @SEB (FEED_REQ) ;V1.27
1205 ;V4.01 call w1_to_w2 ;V1.17
1206 ;V4.01 call w2_to_ten ;V1.17
1207 acc_plus01: ;V1.17
1209 +1 ld wa,F_TNKEY
1210 +1 test (F_TNKEY>>4).a ;bit -reverse-> jump status
1211 +1 j f,acc_plus02 ;if jump status is 0 -> branch
1212 ;check %+/- operation........
1213 cmp (PRE_KEY),K_PER ;if previouse key is % ?
1214 j ne,acc_plus00 ;no ->
1216 +1 ld wa,C_MUL
1217 +1 test (C_MUL>>4).a ;bit -reverse-> jump status
1218 +1 j f,acc_plus20 ;if jump status is 0 -> branch
1219 acc_plus00:
1220
1221 ;if no tenkey entry, check repeat entry........
1222 cmp (PRE_KEY),K_PLS ;if previouse key is + ?
1223 j eq,acc_plus10 ; yes -> use W2(previouse added value) for repeat entry
1224 cmp (PRE_KEY),K_MIN ;if previouse key is - ?
1225 j eq,acc_plus10 ; yes -> use W2(previouse added value) for repeat entry
1226 acc_plus02:
1227 ;V1.05 call ten_to_w2dp ;tenkey -> W2 with DP adjustment
1228 call add_mode ;W2 shift 2digit to right when select ADD mode
1229 j cs,acc_plus03 ;V105 add mode ? yes->
1230 call ten_to_w2dp ;V105 tenkey -> W2 with DP adjustment
1231 ;V3.14 call ten_to_w2 ;V3.12
1232 acc_plus03: ;V105
1233 j acc_plus11
1234
1235 acc_plus10:
1236 ld hl,W2 ;DP adjustment for repeat entry
1237 call dp_adjust ;adjustment DP location previouse accumulated value(in case of change DP slider)
1238 acc_plus11:
1239 ld (SYM),S_PLS
1241 +1 ld wa,F_MIN_TRA
1242 +1 test (F_MIN_TRA>>4).a ;bit -reverse-> jump status
1243 +1 j t,acc_plus12 ;if jump status is 1 -> branch
1244 ld (SYM),S_MIN
1245 acc_plus12:
1246 ld hl,W2
1247 call wk_print ;W2(input value) print
1248 ld hl,ACC
1249 call wk_update ;w2 contents add to ACC and increment item counter
1251 +1 ld wa,F_CALER
1252 +1 test (F_CALER>>4).a ;bit -reverse-> jump status
1253 +1 j f,acc_plus29 ;if jump status is 0 -> branch
1254 ld hl,IC_A
1255 call ic_update ;increment item counter
1256 ld hl,W1 ;V3.05
1257 call _zerock ;V3.05
1258 j ne,acc_plus13 ;V3.05
1259 ld (W1_S),0 ;V3.05
1260 acc_plus13: ;V3.05
1261 call w1_to_ten ;for display accumulated value(W1)
1263 +1 ld wa,FEED_REQ
1264 +1 test (FEED_REQ>>4).a ;bit -reverse-> jump status
1265 +1 j t,acc_plus29 ;if jump status is 1 -> branch
1266 call feed_1 ;V1.27
1268 +1 ld wa,FEED_REQ
1269 +1 clr (FEED_REQ>>4).a
1270 j acc_plus29
1271
1272 ;percent +/- calculation........................
1273 acc_plus20:
1274 call const_to_w2 ;W2 <- multiplicand
1275 call ten_to_w1
1277 +1 ld wa,F_MIN_TRA
1278 +1 test (F_MIN_TRA>>4).a ;bit -reverse-> jump status
1279 +1 j t,acc_plus21 ;if jump status is 1 -> branch
1280 xor (W1_S),0x01 ;W1 sign change
1281 acc_plus21:
1282 call calc_add ;W1<- W1(calculated answer of %) + W2
1284 +1 ld wa,F_CALER
1285 +1 test (F_CALER>>4).a ;bit -reverse-> jump status
1286 +1 j f,acc_plus29 ;if jump status is 0 -> branch
1287 ld hl,W1
1288 call wk_round ;W1(answer) rounding
1289 ld (SYM),S_PRAD
1290 ld (KEYIN),K_PRP ;update current key code to +%(dummy key code)
1292 +1 ld wa,F_MIN_TRA
1293 +1 test (F_MIN_TRA>>4).a ;bit -reverse-> jump status
1294 +1 j t,acc_plus213 ;if jump status is 1 -> branch
1295 ld (SYM),S_PRDS
1296 ld (KEYIN),K_PRM ;update current key code to -%(dummy key code)
1297 acc_plus213:
1299 +1 test (FLG_MODE).2
1300 +1 j f,acc_plus22
1301 call _zerock ;V1.35
1302 j ne,acc_plus22 ;V1.35
1303 ld (W1_S),0 ;V1.35
1304 acc_plus22:
1306 +1 ld wa,F_MIN_TRA
1307 +1 clr (F_MIN_TRA>>4).a
1308 call wk_print ;W1(answer) print
1309 call feed_1
1310 call w1_to_ten ;for display calculated answer(W1)
1311 acc_plus29:
1312 ld (SYM),S_AST ;for error print
1313 ;V4.13 @BBC (SW_TA,acc_plus99) ;V1.39d
1314 ;V4.13 ld (FLG_C),0 ;V1.39d
1315 acc_plus99: ;V1.39d
1316 j function_end
1317
1318
1319 ;===============================================================================
1320 ; S
1321 ;===============================================================================
1322 acc_subtl:
1323 ;V4.01 cmp (PRE_KEY),K_M2CAL ;V1.22
1324 ;V4.01 j ne,acc_subtl_start ;V1.22
1325 ;V4.01 ld (KEYIN),K_M2ST ;V1.22
1326 ;V4.01 jp mem2_subtl_start ;V1.22
1327 acc_subtl_start: ;V1.22
1328 ;V3.00 @BBC (SW_V15,acc_subtl_nov1297) ;V2.05
1329 ;V3.00 @BBC (SW_TA,acc_subtl_nov1297) ;V2.05
1330 ;V3.00acc_subtl_start1:
1331 ;---------------------------------------------for V1297 mode
1332 ;V3.00 @BBC (F_TNKEY,acc_subtl_yuan) ;V1.26
1333 ;V3.00 ld (KEYIN),K_SHD ;V1.26
1334 ;V3.00 jp sharp_date ;V1.26
1335 acc_subtl_yuan: ;V1.25
1336 ;V3.00 ld a,(FLG_E) ;V1.25
1337 ;V3.00 push wa
1338 ;V3.00 @BBC (SW_SGK,acc_subtl_nocont) ;V1.26
1339 ;V3.00 pop wa
1340 ;V3.00 or a,(FLG_C) ;V1.26
1341 ;V3.00 jp acc_subtl_nocont_1 ;V1.26
1342 ;V3.00acc_subtl_nocont: ;V1.26
1343 ;V3.00 pop wa ;V1.26
1344 ;V3.00acc_subtl_nocont_1: ;V1.26
1345 ;V3.00 and a,0y00001111 ;V1.26
1346 ;V3.00 j eq,acc_subtl_clear ;V1.25
1347 ;V3.00 call const_to_w2 ;V1.26
1348 ;V3.00 jp acc_subtl_clear_1 ;V1.26
1349 ;V3.00acc_subtl_clear: ;V1.26
1350 ;V3.00 call w2_clear ;V1.26
1351 ;V3.00acc_subtl_clear_1: ;V1.26
1352 ;V3.00 call w2_to_ten ;V1.26
1353 ;V3.00 ld (SYM),S_ST ;V1.26
1354 ;V3.00 ld hl,W2 ;V1.26
1355 ;V3.00 call wk_print ;V1.26
1356 ;V3.00 call feed_1 ;V1.25
1357 ;V3.00 @BBS (SW_SGK,acc_subtl_9) ;V1.31
1358 ;V3.00 and (FLG_C),0 ;V1.40
1359 ;V3.00 jp acc_subtl_9 ;V1.25
1360 ;----------------------------------------------------
1361 acc_subtl_nov1297:
1362
1363 ;V4.13 @BBC (SW_DTST,acc_subtl_x) ;V1.20
1364 ;V4.13 @BBC (F_TNKEY,acc_subtl_x) ;V1.33
1365 ;V2.10 ld a,(TEN_CT) ;V1.20\
1366 ;V2.10 j eq,acc_subtl_x ;V1.20|ten key entry, to do sharp date function
1367 ;V4.13 ld (KEYIN),K_SHD ;V1.20|
1368 ;V4.13 jp sharp_date ;V1.20/
1369 acc_subtl_x: ;V1.20
1370 ;-----------------------------------------------below is for TA logic
1371 ;V3.00 @BBC (SW_TA,acc_subtl_y) ;V1.19
1372 ;V3.00 ld (FLG_C),0 ;V1.44
1373 ;V3.00 ld a,(FLG_E) ;V1.19
1374 ;V3.00 and a,0y00001111 ;V1.19check E_MUL,E_DIV,E_DLT,E_MU flags
1375 ;V3.00 j z,acc_subtl_y ;V1.19
1376 ;V3.00 @BBC (E_MUP,acc_subtl_x01) ;V1.24
1377 ;V3.00 call equal_mup ;V1.24
1378 ;V3.00 jp acc_subtl_x99 ;V1.24
1379 ;V3.00acc_subtl_x01: ;V1.24
1380 ;V3.00 @BBC (E_DLT,acc_subtl_x02) ;V1.24
1381 ;V3.00 call equal_dlt ;V1.24
1382 ;V3.00 jp acc_subtl_x99 ;V1.24
1383 ;V3.00acc_subtl_x02: ;v1.24
1384 ;V3.00 call equal_sub ;V1.19
1385 ;V3.00acc_subtl_x99:
1386 ;V3.00 ld (FLG_E),0 ;V1.24
1387 ;V3.00 ld (KEYIN),K_EQU ;V1.50
1388 ;V3.00 ld (FLG_C),0 ;V1.24
1389 ;V3.00 @BBS (F_CALER,acc_subtl_9) ;V1.19if error occured? yes->
1390 ;V3.00 call acc_clear ;V1.33
1391 ;V3.00 ld hl,IC_A ;v1.33 ;V1.51
1392 ;V3.00 call ic_update ;V1.33 ;V1.51
1393 ;V3.00 call w1_to_acc ;V1.19
1394 ;V3.00 jp acc_subtl_1y ;V1.33
1395 ;-------------------------------------------------TA logic finished
1396 acc_subtl_y: ;V1.19
1397 acc_subtl_1: ;V1.00/
1398 ld hl,IC_A
1399 call ic_to_icbk ;V1.22
1400 ld (SYM),S_SPC ;V1.24
1401 call ic_print
1402 acc_subtl_1y:
1403 call acc_to_w2 ;V1.11
1404 ;V3.00 @BBC (SW_TA,acc_subtl_1zz) ;V1.35a
1405 ;V3.00 call w2_round ;v1.25a
1406 ;V3.00acc_subtl_1zz: ;V1.35a
1407 call w2_to_w4 ;V1.22 for average calc
1408 call w2_to_ten ;V1.11
1409 ;V3.04 call ten_to_w2dp ;V1.11
1410 acc_subtl_3:
1411 ld hl,W2
1412 ld (SYM),S_ST
1413 call wk_print ;W2(accumulator value) print
1414 call w2_to_ten ;for display accumulator value(W2)
1415 ;V4.13 @SEB (F_FNEABL) ;V1.09
1416 acc_subtl_9: ;V1.19
1417 j function_end
1418
1419 ;===============================================================================
1420 ; T
1421 ;===============================================================================
1422 acc_total:
1423 ;V4.01 cmp (PRE_KEY),K_M2CAL ;V1.22
1424 ;V4.01 j ne,acc_total_start ;V1.22
1425 ;V4.01 ld (KEYIN),K_M2TL ;V1.22
1426 ;V4.01 jp mem2_total ;V1.22
1427 acc_total_start: ;V1.22
1428 ;V4.01 @CLB (F_EQU) ;V1.24
1429 ;------------------------below is for TA logic
1430 ;V3.00 @BBC (SW_TA,acc_total_0) ;V1.19
1431 ;V3.00 ld a,(FLG_E) ;V1.19
1432 ;V3.00 and a,0y00001111 ;V1.19check E_MUL,E_DIV flags
1433 ;V3.00 j nz,acc_total00 ;V1.19
1434 ;V3.00 @BBS (F_PEREXE,acc_total_0) ;V1.24
1435 ;V3.00 ld a,(FLG_C) ;V1.19
1436 ;V3.00 and a,0y00000011 ;V1.39d
1437
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -