Search the web
Sign In
New User? Sign Up
zxgate · ZX-Gate
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
ZX81 Machine Code ???   Message List  
Reply | Forward Message #83 of 188 |
RE: [zxgate] ZX81 Machine Code ???

You can find the rom listing at http://www.wearmouth.demon.co.uk/zx81.htm
 
Interesting bits for you below.
 
    cya,    Andrew...
 
 
; -----------------------
; THE 'INKEY$' EVALUATION
; -----------------------

        CALL    L02BB           ; routine KEYBOARD
        LD      B,H             ;
        LD      C,L             ;
        LD      D,C             ;
        INC     D               ;
        CALL    NZ,L07BD        ; routine DECODE
        LD      A,D             ;
        ADC     A,D             ;
        LD      B,D             ;
        LD      C,A             ;
        EX      DE,HL           ;
        JR      L0FED           ; forward to S-STRING
; ----------------------------------
; THE 'KEYBOARD SCANNING' SUBROUTINE
; ----------------------------------
; The keyboard is read during the vertical sync interval while no video is
; being displayed.  Reading a port with address bit 0 low i.e. $FE starts the
; vertical sync pulse.

;; KEYBOARD
L02BB:  LD      HL,$FFFF        ; (16) prepare a buffer to take key.
...
 
; -------------------------------
; THE 'KEYBOARD DECODING' SECTION
; -------------------------------
;   The decoded key value is in E and HL points to the position in the
;   key table. D contains zero.

;; K-DECODE
L04DF:  LD      A,($4006)       ; Fetch value of system variable MODE
....
-----Original Message-----
From: zx81forever [mailto:zx81forever@...]
Sent: Saturday, 10 January 2004 4:46 PM
To: zxgate@yahoogroups.com
Subject: [zxgate] ZX81 Machine Code ???

I am working on a ZX81 machine code program.
I have a question. I believe the answer may
have appeared in SYNC Magazine (Vol.3 No.6,
featuring "Machine Language:ROM Calls" ???)
but my copy has been misplaced.

My question: how do you determine which key
has been pressed? I need to know the CODE
value of the key pressed.

If I remember correctly, there is a ROM call,
followed by the placing of register BC in HL,
followed by another ROM call.
If anyone can post the exact details, or scan
the "ROM Calls" article out of SYNC (that'll
be a very big help), I would appreciate it.

Thank you,
zx81forever@...




Yahoo! Groups Links


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


Mon Jan 12, 2004 2:03 am

andrewmuck
Offline Offline
Send Email Send Email

Forward
Message #83 of 188 |
Expand Messages Author Sort by Date

I am working on a ZX81 machine code program. I have a question. I believe the answer may have appeared in SYNC Magazine (Vol.3 No.6, featuring "Machine...
zx81forever
Offline Send Email
Jan 10, 2004
8:46 am

You can find the rom listing at http://www.wearmouth.demon.co.uk/zx81.htm <http://www.wearmouth.demon.co.uk/zx81.htm> Interesting bits for you below. cya,...
McMeikan, Andrew
andrewmuck
Offline Send Email
Jan 12, 2004
2:03 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help