|
EAX, EBX, EDI
, etc) STOSD, MOVSD, SHLD
, etc MOVSD/MOVSB
combination to move memory, you can get an [optimum] factor of four improvement
in speed. When a lot of these optimized procedures build up, it is easier to
read your main program if a person don't have to read through several pages of
assembly code. Portability is another issue. Although most of you do not code
for other platforms, some of you may in the future. There is a very nice
Borland Pascal compatible compiler for the Amiga. And there will be one
[eventually] for the BeBox. By moving most of the hardware specific code out of your
program (and units) a majority of the work is in re-creating the assembler
portion of your code on a foreign platform.
|
Whereas in MASM you would declare it as:
|
type Trec=record x,y:word end; var a : Byte; b : Word; c : Shortint; d : Integer; e : Real; f : Single; g : Double; h : Extended; i : Comp; j : Pointer; k : boolean; l : ptr48; m : array[0..15] of pointer; n : TRec; o : array[byte] of TRec; p : ^Trec; |
TRec struc x dw ? y dw ? TRec ends EXTRN A : Byte EXTRN B : Word EXTRN C : Byte EXTRN D : Word EXTRN E : FWord EXTRN F : DWord EXTRN G : QWord EXTRN H : Tbyte EXTRN I : QWord EXTRN J : Dword EXTRN K : Byte EXTRN L : PWord EXTRN M[16] : Dword EXTRN N : TRec EXTRN O[256] : Trec EXTRN P : Dword |