kernal
ZXNet echo conference «code.zx»
From 500:812/00.00 → To Yaroslav Kozlov 23 May 1998
Hello Yaroslav!
AM>> NAME01 EQU 00
AM>> NAME02 EQU 01
AM>> etc. (instead of NAME?? a more or less readable name)
YK> Why??
YK> ORG TABLE
YK> DEFW PROG1
YK>DEFW PROG2
YK>DEFW PROG3
YK> ....
Are you guided by the _NUMBER_ of the function?????
And if there are about a hundred of these functions,
what does the 55th do, and what is the number
function "TRANSFER CHARACTER FROM [A] TO LINE"?
[ ]
AM>> and is used like this:
AM>> RST 16: DB _MENU
AM>> RST 16: DB _PRINT
AM>> DB "Hello All!",0
YK> BASIC 48....
but it's clear
at least for me!
here are a couple of examples:
============================================================
goal - I need to display a "tick"
depending on the flags:
: bit function call where
STP_T BIT 0,(IY-81): RST 16: DB _ON_OFF: DW ST_ECHO
BIT 1,(IY-81): RST 16: DB _ON_OFF: DW ST_EPOI
BIT 3,(IY-81): RST 16: DB _ON_OFF: DW ST_INBF
BIT 4,(IY-81): RST 16: DB _ON_OFF: DW ST_PRIN
BIT 5,(IY-81): RST 16: DB _ON_OFF: DW ST_PWRC
BIT 6,(IY-81): RST 16: DB _ON_OFF: DW ST_KIBFBIT 7,(IY-81): RST 16: DB _ON_OFF: DW ST_PRKE
BIT 7,(IY-68): RST 16: DB _ON_OFF: DW ST_TIME
BIT 7,(IY-80): RST 16: DB _ON_OFF: DW ST_FILE
RET
;**************************************
and here is an example of working with menus:
STP_SERV CALL STP_S
LD IX,WSETUPS
RST 16: DB_OPEN_WIN
STP_SS RST 16: DB_MENU : RET C
[ ]
here we enter some number
STP_SS6 RST 16: DB_PRINT,AT,6,26,0
LD HL,SS_OBUF
RST 16: DB_INP_3NUM
JR C,NSTP_SS
LD(OUT_DELAY),A
JR NSTP_SS
;********************************
and here we display information about the disk:
;OUTPUT FILES,DEL,FREE,MARK,SIZE
PRINT_INFO1 POP HL
PRINT_INFO BIT 7,(IY-69): RET Z
LD A,(IX+30) ; FILES
LD HL,INF_FL: RST 16: DB_DECO_NUM
LD A,(IX+33) ; ERASED
LD HL,INF_DL: RST 16: DB_DECO_NUM
LD A,(IX+26) ; Tagged
LD HL,INF_SL: RST 16: DB_DECO_NUM
LD C,(IX+31): LD B,(IX+32) ;FREE
LD HL,INF_FR : CALL DECODE_BC4
LD C,(IX+27): LD B,(IX+28) ;MARK
LD HL,INF_SZ: CALL DECODE_BC4
PUSH IX: LD IX,MID_WIN
RST 16: DB_PRINT
DB AT,0.7
INF_FL DB " ",AT,1,7
INF_DL DB " ",AT,2,6
INF_FR DB " ",AT,3,7
INF_SL DB " ",AT,4,6
INF_SZ DB " ",AT,8,8
INF_ST DB 32.0
POP IX: RET
;*************************
Well, how can you understand?
[ ]AM>> and use the Is-dos principle
AM>> LD C,??? : RST 16 - to the garden!
YK> I don't use it at all...
i.e. you use
LD r,?: CALL adr
what?
from _my_ point of view - memory loss
(2 bytes per call),
and I have hundreds of calls!
[ ]
YK> There can, of course, be fixed everywhere
YK> bathroom calls via CALL. I mean
YK> "other people's requests to the kernal". Here
YK> it’s unlikely that anything can be done. Once again
for "other people's calls" I use
the same RST 16!
examples of "other people's requests" - external setup
for 2.20, statistics overlay for 4.00...
as it turned out - convenient!
(although this is just my opinion)
Well that's all
*MAS* with a sledgehammer
-+- handles [left and right]