italic.asm 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ; Sets ITALIC flag in P_FLAG permanently
  2. ;- (isn’t it oblique or slanted instead? italic is a totally different thing...)
  3. ; Parameter: ITALIC flag in bit 0 of A register
  4. #include once <copy_attr.asm>
  5. ;
  6. ITALIC:
  7. ;- PROC
  8. and #1 ;- and 1
  9. ;- rrca
  10. ;- rrca
  11. ;- rrca
  12. lda #<FLAGS2 ;- ld hl,FLAGS2
  13. sta z80_l
  14. lda #>FLAGS2
  15. sta z80_h
  16. ldy #$00 ;- res 5,(hl)
  17. lda (z80_hl),y
  18. and #$DF
  19. sta (z80_hl),y
  20. ldy #$00 ;- or (hl)
  21. ora (z80_hl),y
  22. lda z80_a ;- ld (hl),a
  23. ldy #$00
  24. sta (z80_hl),y
  25. rts ;- ret
  26. ; Sets ITALIC flag in P_FLAG temporarily
  27. ITALIC_TMP:
  28. and #1 ;- and 1
  29. ;- rrca
  30. ;- rrca
  31. ;- rrca
  32. ;- rrca
  33. lda #<FLAGS2 ;- ld hl,FLAGS2
  34. sta z80_l
  35. lda #>FLAGS2
  36. sta z80_h
  37. ldy #$00 ;- res 4,(hl)
  38. lda (z80_hl),y
  39. and #$EF
  40. sta (z80_hl),y
  41. ldy #$00 ;- or (hl)
  42. ora (z80_hl),y
  43. lda z80_a ;- ld (hl),a
  44. ldy #$00
  45. sta (z80_hl),y
  46. rts ;- ret
  47. ;- ENDP