Jump to content
IGNORED

Code question


Recommended Posts

In this snippet of code ( the comments are mine ) :

 

SENDBYT TAX         ; save char to be sent

WPUT LDA IRQST         ; loop

AND #$10          ; until serial output data needed is true ( i.e., send completed )

BNE WPUT          ; end loop

LDA #$EF          ; 1110 1111

STA IRQEN         ; enable everything except serial output data needed (?)

LDA #$D0          ; 1101 0000

STA IRQEN         ; disable serial input data needed and timer interrupts

TXA               ; put send char back in A

STA SEROUT        ; put it (again) into xmit slot

LDX IRQST         ; load IRQ status

BPL ERR128        ; if N=0 goto ERR128 ( checking for break key? )

 

The BPL at the end looks like it is trying to detect a break key press..the preceding LDX from IRQ status would have bit 7 set if a break keypress had occured...which would cause the N flag to be *set*, not cleared...so the BPL seems like it is wrong. So what am I missing?

Edited by danwinslow
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...