home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / assemblr / library / asm_kit / lexinser.asm < prev    next >
Assembly Source File  |  1985-06-21  |  640b  |  16 lines

  1. ;ROUTINE TO INSERT A WORD IN AN    ORDERED    LIST OF    WORDS            00000100
  2. ;                                    00000200
  3. lexinsert     proc    far                        00000300
  4. ;                                    00000400
  5.           push    ax      ;SAVE    REGISTERS            00000500
  6.           call    lexsearch ;SEARCH FOR MATCH            00000600
  7.           cmp    al,0      ;ALREADY THERE?            00000700
  8.           je    lexinsertexit     ;SKIP IF SO            00000800
  9.           call    strinsert ;INSERT THE NEW WORD            00000900
  10. ;                                    00001000
  11. lexinsertexit:                                00001100
  12.           pop    ax      ;RESTORE REGISTERS            00001200
  13.           ret                            00001300
  14. ;                                    00001400
  15. lexinsert     endp                            00001500
  16.