?login_element?

Subversion Repositories NedoOS

Rev

Rev 126 | Blame | Compare with Previous | Last modification | View Log | Download

  1. ;**********************************
  2. ;** ZX SPECTRUM SYSTEM VARIABLES **
  3. ;**********************************
  4.  
  5. KSTATE_0        equ     $5C00   ; 23552 ; (IY+$C6) ; Used in reading the keyboard.
  6. KSTATE_4        equ     $5C04   ; 23556 ; (IY+$CA)
  7. LASTK           equ     $5C08   ; 23560 ; (IY+$CE) ; Stores newly pressed key.
  8. REPDEL          equ     $5C09   ; 23561 ; (IY+$CF) ; Time (in 50ths of a second in 60ths of a second in N. America) that a key must be held down before it repeats. This starts off at 35, but you can POKE in other values.
  9. REPPER          equ     $5C0A   ; 23562 ; (IY+$D0) ; Delay (in 50ths of a second in 60ths of a second in N. America) between successive repeats of a key held down: initially 5.
  10. DEFADD          equ     $5C0B   ; 23563 ; (IY+$D1) ; Address of arguments of user defined function if one is being evaluated; otherwise 0.
  11. KDATA           equ     $5C0D   ; 23565 ; (IY+$D3) ; Stores 2nd byte of colour controls entered from keyboard .
  12. TVDATA_LO       equ     $5C0E   ; 23566 ; (IY+$D4) ; Stores bytes of colour, AT and TAB controls going to television.
  13. TVDATA_HI       equ     $5C0F   ; 23567 ; (IY+$D5)
  14. STRMS_FD        equ     $5C10   ; 23568 ; (IY+$D6) ; Addresses of channels attached to streams.
  15. STRMS_00        equ     $5C16   ; 23574 ; (IY+$DC)
  16. CHARS           equ     $5C36   ; 23606 ; (IY+$FC) ; 256 less than address of character set (which starts with space and carries on to the copyright symbol). Normally in ROM, but you can set up your own in RAM and make CHARS point to it.
  17. RASP_PIP        equ     $5C38   ; 23608 ; (IY+$FE) ; Length of warning buzz.
  18. ERR_NR          equ     $5C3A   ; 23610 ; (IY+$00) ; 1 less than the report code. Starts off at 255 (for 1) so PEEK 23610 gives 255.
  19. FLAGS           equ     $5C3B   ; 23611 ; (IY+$01) ; Various flags to control the BASIC system. See *
  20. TV_FLAG         equ     $5C3C   ; 23612 ; (IY+$02) ; Flags associated with the television. See **
  21. ERR_SP          equ     $5C3D   ; 23613 ; (IY+$03) ; Address of item on machine stack to be used as error return.
  22. LIST_SP         equ     $5C3F   ; 23615 ; (IY+$05) ; Address of return address from automatic listing.
  23. MODE            equ     $5C41   ; 23617 ; (IY+$07) ; Specifies K, L, C. E or G cursor.
  24. NEWPPC          equ     $5C42   ; 23618 ; (IY+$08) ; Line to be jumped to.
  25. NSPPC           equ     $5C44   ; 23620 ; (IY+$0A) ; Statement number in line to be jumped to. Poking first NEWPPC and then NSPPC forces a jump to a specified statement in a line.
  26. PPC             equ     $5C45   ; 23621 ; (IY+$0B) ; Line number of statement currently being executed.
  27. SUBPPC          equ     $5C47   ; 23623 ; (IY+$0D) ; Number within line of statement being executed.
  28. BORDCR          equ     $5C48   ; 23624 ; (IY+$0E) ; Border colour * 8; also contains the attributes normally used for the lower half of the screen.
  29. E_PPC           equ     $5C49   ; 23625 ; (IY+$0F) ; Number of current line (with program cursor).
  30. E_PPC_HI        equ     $5C4A   ; 23626 ; (IY+$10)
  31. VARS            equ     $5C4B   ; 23627 ; (IY+$11) ; Address of variables.
  32. DEST            equ     $5C4D   ; 23629 ; (IY+$13) ; Address of variable in assignment.
  33. CHANS           equ     $5C4F   ; 23631 ; (IY+$15) ; Address of channel data.
  34. CURCHL          equ     $5C51   ; 23633 ; (IY+$17) ; Address of information currently being used for input and output.
  35. PROG            equ     $5C53   ; 23635 ; (IY+$19) ; Address of BASIC program.
  36. NXTLIN          equ     $5C55   ; 23637 ; (IY+$1B) ; Address of next line in program.
  37. DATADD          equ     $5C57   ; 23639 ; (IY+$1D) ; Address of terminator of last DATA item.
  38. E_LINE          equ     $5C59   ; 23641 ; (IY+$1F) ; Address of command being typed in.
  39. K_CUR           equ     $5C5B   ; 23643 ; (IY+$21) ; Address of cursor.
  40. CH_ADD          equ     $5C5D   ; 23645 ; (IY+$23) ; Address of the next character to be interpreted: the character after the argument of PEEK, or the NEWLINE at the end of a POKE statement.
  41. X_PTR           equ     $5C5F   ; 23647 ; (IY+$25) ; Address of the character after the ? marker.
  42. WORKSP          equ     $5C61   ; 23649 ; (IY+$27) ; Address of temporary work space.
  43. STKBOT          equ     $5C63   ; 23651 ; (IY+$29) ; Address of bottom of calculator stack.
  44. STKEND          equ     $5C65   ; 23653 ; (IY+$2B) ; Address of start of spare space.
  45. STKEND_HI       equ     $5C66   ; 23654 ; (IY+$2C)
  46. BREG            equ     $5C67   ; 23655 ; (IY+$2D) ; Calculator's b register.
  47. MEM             equ     $5C68   ; 23656 ; (IY+$2E) ; Address of area used for calculator's memory. (Usually MEMBOT, but not always.)
  48. FLAGS2          equ     $5C6A   ; 23658 ; (IY+$30) ; More flags. See ***
  49. DF_SZ           equ     $5C6B   ; 23659 ; (IY+$31) ; The number of lines (including one blank line) in the lower part of the screen.
  50. S_TOP           equ     $5C6C   ; 23660 ; (IY+$32) ; The number of the top program line in automatic listings.
  51. OLDPPC          equ     $5C6E   ; 23662 ; (IY+$34) ; Line number to which CONTINUE jumps.
  52. OSPPC           equ     $5C70   ; 23664 ; (IY+$36) ; Number within line of statement to which CONTINUE jumps.
  53. FLAGX           equ     $5C71   ; 23665 ; (IY+$37) ; Various flags. See ****
  54. STRLEN          equ     $5C72   ; 23666 ; (IY+$38) ; Length of string type destination in assignment.
  55. T_ADDR          equ     $5C74   ; 23668 ; (IY+$3A) ; Address of next item in syntax table (very unlikely to be useful).
  56. SEED            equ     $5C76   ; 23670 ; (IY+$3C) ; The seed for RND. This is the variable that is set by RANDOMIZE.
  57. FRAMES1         equ     $5C78   ; 23672 ; (IY+$3E) ; 3 byte (least significant first), frame counter. Incremented every 20ms.
  58. UDG             equ     $5C7B   ; 23675 ; (IY+$41) ; Address of 1st user defined graphic You can change this for instance to save space by having fewer user defined graphics.
  59. COORDS          equ     $5C7D   ; 23677 ; (IY+$43) ; x-coordinate of last point plotted.
  60. COORDS_Y        equ     $5C7E   ; 23678 ; (IY+$44) ; y-coordinate of last point plotted.
  61. PR_CC           equ     $5C80   ; 23680 ; (IY+$46) ; Full address of next position for LPRINT to print at (in ZX printer buffer). Legal values $5B00 - $5B1F. [Not used in 128K mode or when certain peripherals are attached]
  62. ECHO_E          equ     $5C82   ; 23682 ; (IY+$48) ; 33 column number and 24 line number (in lower half) of end of input buffer.
  63. DF_CC           equ     $5C84   ; 23684 ; (IY+$4A) ; Address in display file of PRINT position.
  64. DFCCL           equ     $5C86   ; 23686 ; (IY+$4C) ; Like DF_CC for lower part of screen.
  65. S_POSN          equ     $5C88   ; 23688 ; (IY+$4E) ; 33 column number for PRINT position
  66. S_POSN_HI       equ     $5C89   ; 23689 ; (IY+$4F) ; 24 line number for PRINT position.
  67. SPOSNL          equ     $5C8A   ; 23690 ; (IY+$50) ; Like S_POSN for lower part
  68. SPOSNL_HI       equ     $5C8B   ; 23691 ; (IY+$51)
  69. SCR_CT          equ     $5C8C   ; 23692 ; (IY+$52) ; Counts scrolls: it is always 1 more than the number of scrolls that will be done before stopping with scroll? If you keep poking this with a number bigger than 1 (say 255), the screen will scroll on and on without asking you.
  70. ATTRP_MASKP     equ     $5C8D   ; 23693 ; (IY+$53) ; Permanent current colours, etc (as set up by colour statements).
  71. ATTRT_MASKT     equ     $5C8F   ; 23695 ; (IY+$55) ; Temporary current colours, etc (as set up by colour items).
  72. MASK_T          equ     $5C90   ; 23696 ; (IY+$56) ; Like MASK_P, but temporary.
  73. P_FLAG          equ     $5C91   ; 23697 ; (IY+$57) ; More flags.
  74. MEM_0           equ     $5C92   ; 23698 ; (IY+$58) ; Calculator's memory area; used to store numbers that cannot conveniently be put on the calculator stack.
  75. MEM_3           equ     $5CA1   ; 23713 ; (IY+$67)
  76. MEM_4           equ     $5CA6   ; 23718 ; (IY+$6C)
  77. MEM_4_4         equ     $5CAA   ; 23722 ; (IY+$70)
  78. MEM_5_0         equ     $5CAB   ; 23723 ; (IY+$71)
  79. MEM_5_1         equ     $5CAC   ; 23724 ; (IY+$72)
  80. NMIADD          equ     $5CB0   ; 23728 ; (IY+$76) ; This is the address of a user supplied NMI address which is read by the standard ROM when a peripheral activates the NMI. Probably intentionally disabled so that the effect is to perform a reset if both locations hold zero, but do nothing if the locations hold a non-zero value. Interface 1's with serial number greater than 87315 will initialize these locations to 0 and 80 to allow the RS232 "T" channel to use a variable line width. 23728 is the current print position and 23729 the width - default 80.
  81. RAMTOP          equ     $5CB2   ; 23730 ; (IY+$78) ; Address of last byte of BASIC system area.
  82. P_RAMT          equ     $5CB4   ; 23732 ; (IY+$7A) ; Address of last byte of physical RAM.
  83.  
  84. ; *
  85. ; FLAGS equ             $5C3B   ; 23611 ; (IY+$01) ; BASIC flags, particular bits meaning:
  86. ;                                                  ; 0 ... 1 = supress leading space for tokens
  87. ;                                                  ; 1 ... 1 = listing to ZX Printer
  88. ;                                                  ; 2 ... 1 = listing in mode 'L', 0 = listing in mode 'K'
  89. ;                                                  ; 3 ... 1 = keyboard mode 'L', 0 = keyboard mode 'K'
  90. ;                                                  ; 4 ... 48k: unused, 128k: 0 = basic48, 1 = basic128
  91. ;                                                  ; 5 ... 1= new key was pressed on
  92. ;                                                  ; 6 ... 1= numeric result of the operation, 0=string result of the operation (SCANN is set)
  93. ;                                                  ; 7 ... 1= syntax checking off, 0=syntax checking on
  94. ;
  95. ; **
  96. ; TV_FLAG       equ     $5C3C   ; 23612 ; (IY+$02) ; PRINT routine flags, particular bits meaning:
  97. ;                                                  ; 0 ... 1=lower part of screen
  98. ;                                                  ; 3 ... 1=mode change in EDIT
  99. ;                                                  ; 4 ... 1=Autolist
  100. ;                                                  ; 5 ... 1=screen is clear
  101. ;
  102. ; ***
  103. ; FLAGS2        equ     $5C6A   ; 23658 ; (IY+$30) ; BASIC flags, particular bits meaning:
  104. ;                                                  ; 0 ... 1=screen is clear
  105. ;                                                  ; 1 ... 1=ZX Printeru buffer is not empty
  106. ;                                                  ; 2 ... 1=quotation mode during string processing
  107. ;                                                  ; 3 ... 1=caps lock
  108. ;                                                  ; 4 ... 1=channel 'K'
  109. ;                                                  ; 5 ... 1=new key was pressed on
  110. ;                                                  ; 6 ... unused
  111. ;                                                  ; 7 ... unused
  112. ;
  113. ; ****
  114. ; FLAGX         equ     $5C71   ; 23665 ; (IY+$37) ; BASIC flags, particular bits meaning:
  115. ;                                                  ; 0 ... 1=remove string from variable before new string assign
  116. ;                                                  ; 1 ... 1=create variable at LET, 0=variable already exists
  117. ;                                                  ; 5 ... 1=INPUT mode, 0=EDIT BASIC line
  118. ;                                                  ; 6 ... 1=numeric variable in INPUT, 0=string variable in INPUT mode
  119. ;                                                  ; 7 ... 1=input line
  120.