(C) SKL-KEEPER aka Kolesnikov
__________________________________________
Coding for Dummies
This small article I would like to dedicate
how to make a valid and convenient
for the user to exit the program.
What does not get in your system software or utilities that
after completing its work without even asking you to the
question of whether you want to finish the job with the
program? What makes this case user? Yes presses "Reset" and all
the works!
And sometimes, that and wondered what, say,
finished? User clicks
"Y" and throws out safely in BASIC!
Poor nick has no choice as
Again press "Reset", to the monitor or TV to see the familiar
TR-DOS menu ...
And yet how beautiful, civilized and well-received software
developers, when the user if they wish with just one
or two keystrokes out of the program, and the computer is
helpfully not only folds, but also came out in TR-DOS, and even
downloaded the "boot"! What a pleasure sinklerist experience of
working with this program! And the developer with a kind word
will remember :-)
I was wondering, how is it done? Download one of these
programs in their civilized "Scorpio" and with a bit of shadow
monitor dug in it. Everything was so simple that
even awkward note to devote this thread!
But nevertheless, I anywhere and never
seen in the literature of such material,
so I decided to share this discovery with his friends in the
hobby. Even if not for use, but just for interest,
I think it is useful to you. And you, aces coding, do not
smile, but rather more devote articles and notes about the
secrets programming, and, based not on
"Mother" of coders, and those who are in assembler weak, but
wants to know more!
So, if you need to make a way out
program in the manner I have described,
upon request of the desire to leave the program
You're doing a survey on the keyboard press
"Y", and if it is pressed, the transition to a
program from:
RESET LD HL, 0
PUSH HL
JP # 3D2F
A little commentary. We are through
Register HL enters the stack zero address
and are doing to address JP # 3D2F, where, as we know, is
NOP, and RET. After the command RET we return to the address on
the top of the stack, and we've got a zero. But recourse to
address # 3D2F ROM on switches TR-DOS. If the TR-DOS starts at
address 0, then after initialization, the computer system
selects the drive "A" and tries to download it and run a BASIC
program "Boot". And to us that right!
Good luck to you in coding, beginners!