> Wasting of interrupt time ? That's what those functions are for - to be used.
> How the do you think "C" does it ?   Exactly the same!   It calls DOS.
> But it usually takes a couple of kilobytes detour on the way. :(

this is I think the way DOS does it. I never used interrupts to do
menial tasks before, just branch to the relevant rom code! I admit that
I never programmed with PC's and MS-DOS though. on Amiga there are
shared libraries with all system functions. Sure, some little overhead
but you must have that to make the machine not so limited.

> What do you mean by "small endian m over c ?

well, thats a big question - big endian and small endian (m/c is machine
code) architectures hold numbers in memory in different ways. consider
that you have a long word held in memory at location 0x100

0000 0100:  45 2a 3f 00

now on big-end architecture (Motorola, ..) that number has the value of
452a3f00 but on small-end architecture (Intel) then it is something
different because the numbers go backwards (so its 003f2a45?). in the
assembler language it looks similarly strange to me, because

mov ax,0040

means load the number 0040 into the ax register(?). In motorola
assembler, you would write it the other way around (in the way that
you speak it, in fact)

move.w #0x0040,a0   ; move the word value (hex)0040 into a0. 
move.l 0x0040,a1    ; move the longword at address 0040 into a1.
move.b (a2),d1      ; move the byte at the address in a2, into d1

this is more logical for me. Assembly language is for people after all!

iain

longword is 32-bits, word is 16 bits, byte is 8 bits. numbers are
decimal unless you start with 0 (octal) or 0x (hex)


-- Arachne V1.70;rev.3, NON-COMMERCIAL copy, http://arachne.cz/

Reply via email to