bold.asm 991 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ; Sets BOLD flag in P_FLAG permanently
  2. ; Parameter: BOLD flag in bit 0 of A register
  3. #include once <copy_attr.asm>
  4. ;
  5. BOLD:
  6. ;- PROC
  7. and #1 ;- and 1
  8. ;- rlca
  9. ;- rlca
  10. ;- rlca
  11. lda #<FLAGS2 ;- ld hl,FLAGS2
  12. sta z80_l
  13. lda #>FLAGS2
  14. sta z80_h
  15. ldy #$00 ;- res 3,(hl)
  16. lda (z80_hl),y
  17. and #$F7
  18. sta (z80_hl),y
  19. ldy #$00 ;- or (hl)
  20. ora (z80_hl),y
  21. lda z80_a ;- ld (hl),a
  22. ldy #$00
  23. sta (z80_hl),y
  24. rts ;- ret
  25. ; Sets BOLD flag in P_FLAG temporarily
  26. BOLD_TMP:
  27. and #1 ;- and 1
  28. ;- rlca
  29. ;- rlca
  30. lda #<FLAGS2 ;- ld hl,FLAGS2
  31. sta z80_l
  32. lda #>FLAGS2
  33. sta z80_h
  34. ldy #$00 ;- res 2,(hl)
  35. lda (z80_hl),y
  36. and #$FB
  37. sta (z80_hl),y
  38. ldy #$00 ;- or (hl)
  39. ora (z80_hl),y
  40. lda z80_a ;- ld (hl),a
  41. ldy #$00
  42. sta (z80_hl),y
  43. rts ;- ret
  44. ;- ENDP