home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / c / cug292wk.zip / ASXXXX.BUG < prev    next >
Text File  |  1993-01-22  |  4KB  |  140 lines

  1. /* V01.50 Bugs */
  2.  
  3. (1):    1-May-91
  4.  
  5. /* aslist.c ----------------------------------------*/
  6. /*
  7.  * Send bytes of code to the listing.
  8.  * A subroutine of `list'.
  9.  */
  10. VOID
  11. list1(wp, wpt, nb, f)
  12. register char *wp;
  13. register int nb, *wpt;        /* needs , f */
  14. {
  15. /*--------------------------------------------------*/
  16.  
  17.  
  18. (2):    15-May-91
  19.  
  20. The construct of (more() && comma()) used in m09mch.c is invalid
  21. because comma() is of type VOID. Change comma() to type int and return(1).
  22.  
  23. /* m09mch.c ----------------------------------------*/
  24. /*
  25.  * The next character must be a
  26.  * comma.
  27.  */
  28. int
  29. comma()
  30. {
  31.     if (getnb() != ',')
  32.         qerr();
  33.     return(1);
  34. }
  35. /*--------------------------------------------------*/
  36.  
  37. Change the external definition of comma in m6809.h from VOID to int.
  38.  
  39. All xxxmch.c and xxx.h files should incorporate these changes.
  40.  
  41.  
  42. (3):    31-May-91
  43.  
  44. Compiling the assemblers with Turbo C (V2.01) in the unsigned character
  45. mode causes the assemblers to produce errors when processing the
  46. .ascii and .asciz directives.  The C subroutine getmap() in aslex.c and
  47. lklex.c should be changed from type char to int (this allows the match
  48. case to return a -1 rather than a character value of 0xFF (unsigned
  49. character) or the sign extended value of 0xFFFF (for a signed character).
  50.  
  51. /* aslex.c ----------------------------------------*/
  52. char
  53. getmap(d)
  54. {
  55. /*--------------------------------------------------*/
  56. /* lklex.c ----------------------------------------*/
  57. char
  58. getmap(d)
  59. {
  60. /*--------------------------------------------------*/
  61.  
  62. The use of getmap() in asexpr.c and lkeval.c should be characterized by
  63. &0377.
  64. /* asexpr.c ----------------------------------------*/
  65.     if (c == '\'') {
  66.         esp->e_mode = S_USER;
  67.         esp->e_flag = 0;
  68.         esp->e_base.e_ap = NULL;
  69.         esp->e_addr = getmap(-1)&0377;
  70.         return;
  71.     }
  72. /*--------------------------------------------------*/
  73. /* lkeval.c ----------------------------------------*/
  74.     if (c == '\'') {
  75.         return(getmap(-1)&0377);
  76.     }
  77. /*--------------------------------------------------*/
  78.  
  79. Change the external definitions in asm.h and aslink.h from char to int.
  80.  
  81.  
  82. (4):    15-Jun-91
  83.  
  84. An assembler bug has been noted for the 'sub' instruction in the asz80
  85. assembler. Only the immediate mode is assembled correctly.
  86. The following change is required in the file z80mch.c :
  87.  
  88. /* incorrect z80mch.c-------------------------------*/
  89.     case S_AND:
  90.     case S_SUB:
  91.         t1 = 0;
  92.         t2 = addr(&e2);
  93.         if (more()) {
  94.             if ((t2 != S_R8) || (e2.e_addr != A))
  95.                 ++t1;
  96.             comma();
  97.             t2 = addr(&e2);
  98.         }
  99.         if (rf==S_SUB && t2!=S_IMMED) {
  100.             if (genop(0xCB, op, &e2, 0) || t1)
  101.                 aerr();
  102.         } else {
  103.             if (genop(0, op, &e2, 1) || t1)
  104.                 aerr();
  105.         }
  106.         break;
  107. /*--------------------------------------------------*/
  108.  
  109. /* corrected z80mch.c-------------------------------*/
  110.     case S_AND:
  111.     case S_SUB:
  112.         t1 = 0;
  113.         t2 = addr(&e2);
  114.         if (more()) {
  115.             if ((t2 != S_R8) || (e2.e_addr != A))
  116.                 ++t1;
  117.             comma();
  118.             t2 = addr(&e2);
  119.         }
  120.         if (genop(0, op, &e2, 1) || t1)
  121.             aerr();
  122.         break;
  123. /*--------------------------------------------------*/
  124.  
  125. Change the z80 sub instruction test in file tz80.asm to:
  126. /* tz80.asm ----------------------------------------*/
  127.     ;subtract operand from 'a'
  128.     sub    a,(hl)            ; 96
  129.     sub    a,offset(ix)        ; DD 96 55
  130.     sub    a,offset(iy)        ; FD 96 55
  131.     sub    a,a            ; 97
  132.     sub    a,b            ; 90
  133.     sub    a,c            ; 91
  134.     sub    a,d            ; 92
  135.     sub    a,e            ; 93
  136.     sub    a,h            ; 94
  137.     sub    a,l            ; 95
  138.     sub    a,#n            ; D6 20
  139. /*--------------------------------------------------*/