Re: Software for MS-DOS 1.25

From: Michał Pleban <lists_at_michau.name>
Date: Sun, 05 Nov 2017 18:29:49 +0100
Message-ID: <59FF4A8D.20902@michau.name>
smf wrote:

> I meant on the 6509 side. Converting MDA screen+attribute to potentially
> multiple petscii/rvson/rvsoff which are then converted into single
> writes to the screen just seems a waste of cpu cycles.

Oh OK, you meant the 6509 side. The main reason is that I haven't
written any 6509 code yet. I am just relying on the IO library from
MS-DOS 1.25, and that's what it does for screen output - it calls BSOUT
in the KERNAL.

Anyway, it's not such a waste of CPU cycles ad it might sound. Consider
what is required to print one character:

1. The 8088 BIOS must be called with the appropriate IO function number.
2. The BIOS must examine the IPC structure to find out about the
function being called, its parameters etc.
3. The function number and parameters must be passed to the 6509, which
involves lots of manual bit-banging of signals on the CIA port.
4. The 6509 receives the interrupt and the number of function, and it
examines its own jump table to determine how to handle the function.
5. The actual function prints the character on the screen.
6. The 6509 code wakes up the 8088 again, which involves a bit of signal
bit-banging on its own.
7. Mercifully, this particular function has no output parameters, which
would mean lots of more bit-banging.
8. The BIOS code returns to the application.

So yes, you can optimize the step #5 a little but but in the overall
scheme of things it will not mean much ;-)

Now, of course, the situation with the reverse bit is a bit more
complicated, because it currently means we have to go through this
procedure three times: to print RVSON, the actual character, and RVSOFF
back. _That_ indeed should be optimized at some point into one 6509 call
which would take two parameters: the PETSCII code and flag whether to
reverse it or not.

Regards,
Michau.



       Message was sent through the cbm-hackers mailing list
Received on 2017-11-05 18:02:43

Archive generated by hypermail 2.2.0.