?login_element?

Subversion Repositories NedoOS

Rev

Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.     OUTPUT "disp.bin"
  2.  
  3.     ORG $8000
  4. phase1_start:
  5.     PHASE $FFFF
  6. longptr1:   DB      'A'
  7. longptr2:   DB      'B'
  8. longptr3:   DB      'C'
  9.     UNPHASE
  10. phase1_end:
  11.  
  12. normalmem:  DB      '_'
  13.  
  14.     ORG $FFFF
  15. phase2_start:
  16.     PHASE $FFFE
  17. longptr4:   DB      '.D'    ; disp FFFE..FFFF, but crossing real memory $10000
  18. longptr5:   DB      'E'     ; crossing also disp $10000
  19. longptr6:   DB      'F'
  20.     UNPHASE
  21. phase2_end:
  22.  
  23. longmem:    DB      '_'
  24.  
  25.     ORG $240000
  26. phase3_start:
  27.     PHASE $FFFFFF
  28. longptr7:   DB      'G'
  29. longptr8:   DB      'H'
  30. longptr9:   DB      'I'
  31.     UNPHASE
  32. phase3_end:
  33.  
  34.     ; but using the long pointers still emits the truncation warning
  35.     ld      hl,longptr7
  36.     dw      longptr8
  37.     ; no warning when explicit truncation is used
  38.     ld      hl,longptr7&$FFFF
  39.     dw      longptr8&$FFFF
  40.  
  41. ; added: in one project the usage of `DS 0` did uncover bug truncating longptr addresses back to 16b, fixed in v1.18.4
  42.  
  43.     ORG $35000
  44. phase4_start:
  45.     PHASE $46000
  46. longptrA:
  47.         DS  0,'!'
  48. longptrB:
  49.     UNPHASE
  50. phase4_end:
  51.     ASSERT longptrA == longptrB && phase4_start == phase4_end
  52.