jhallen@wpi.wpi.edu (Joseph H Allen) (02/24/89)
Warning: This is a (silly) flame
OK, so who's the one responsible for the Intel/Microsoft instruction
set mnemonics and assembly language? They're disgusting!
1 - Why the '0f8h' constant method instead of the much nicer '$f8' method?
2 - What's with this 'OFFSET label' junk? It should be written '#label'
(or #label-segment to get segment offset)
3 - Every Motorola programmer knows that the proper comment introducer is
'*' not ';'
4 - Why 'mov' when 'ld' implies right to left?
5 - Why exactly is the assembly language structured/object oriented? If
I had written the assembler, this module:
IGROUP group _TEXT
assume cs:IGROUP
_TEXT segment byte public 'CODE'
PUBLIC _getone
; function to return next key pressed or -1 if none
_getone PROC near
mov ah,6 ; call no. 6
mov dl,0ffh ; indicate that this is a read
int 21h ; call dos
mov ah,0 ; zero upper half
jnz ex ; branch if got a key
mov ax,0ffffh ; load -1
ex: ret
_getone ENDP
_TEXT ends
end
- - - -
Would be written this way:
segment CODE
public _getone
* Function to return next key pressed or -1 if none
_getone ld ah,#6 Call No. 6
ld dl,#$ff indicate read, not write
swi $21 call dos
ld ah,#0 make ax clean return register
bne ex branch if no key
ld ax,#$ffff indicate no key
ex rtsdavidsen@steinmetz.ge.com (William E. Davidsen Jr) (02/27/89)
In article <993@wpi.wpi.edu> jhallen@wpi.wpi.edu (Joseph H Allen) writes: | | Warning: This is a (silly) flame | 3 - Every Motorola programmer knows that the proper comment introducer is | '*' not ';' Excuse me? Does that mean there's no constant multiply?? For example: bufsiz equ 22 ... mov al,5*bufsize ; how in hell can * be a comment Does Motorola really use * for a comment?? -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me