home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Antic Magazine 1982 December
/
Antic_December_1982_Vol_1_No_5.atr
/
forthfa5.tmp
< prev
next >
Wrap
Text File
|
2021-02-07
|
1KB
|
1 lines
( 60 ANTIC ISSUE #5 SCREEN #1 )¢0 VARIABLE IOCB# ( AN INDEXING CLOBAL VARIABLE )¢¢: IOCBX IOCB# @ 16 * ;¢ ( BYTE OFFSET FROM IOCB 0 )¢¢HEX¢CODE CALL -CIO¢XSAVE STX, 0 ,X LDA, TAX, ( TOP STACK IN TO X REG)¢E456 JSR, XSAVE LDX, POP JMP, ( CIO VECTOR DROP TOP STACK )¢END-CODE¢¢: SERVES.AS ( DEFINING WORD )¢ <BUILDS , ( COMPILE BASE ADDR FOR CONTROL BLOCK 0)¢ DOES> @ IOCBX + ; ( GET BASE ADDR ADD OFFSET )¢( 61 ANTIC #5 )¢( BUILD ACCESS WORDS )¢HEX¢342 SERVES.AS COMMAND ( BYTE LOCATION )¢343 SERVES.AS STATUS ( BYTE )¢344 SERVES.AS BUFF-ADDR ( 16BIT WORD )¢348 SERVES.AS BUFF-LEN ( WORD )¢34A SERVES.AS AUX1 ( BYTE )¢34B SERVES.AS AUX2 ( BYTE )¢¢: GETCHR. ( GET CHAR FROM ANY DEVICE)¢7 COMMAND C! HERE BUFF-ADDR !¢1 BUFF-LEN ! ( SETUP CONTROL BLACK )¢IOCBX CALL-CIO HERE C@ ;¢( LEAVE CHAR VALUE ON STACK )¢¢( 62 ANTIC #5 )¢0 VARIABLE V# ( INDEXING VARIABLE )¢: VOICE V# ! ;¢: SOUNDS ( ARRAY OF VALUES )¢ <BUILDS HERE OVER ERASE ALLOT ( CLEAR LOCATIONS )¢ DOES> V# @ + ; ( GET BYTE LOCATION RELATIVE TO V# )¢¢( VALUES ARE COMBINED AND SENT TO HARDWARE REGISTERS )¢4 SOUNDS VOLUME¢4 SOUNDS PITCH¢4 SOUNDS DISTORTION¢¢( ARRAY USED BY 4 VOICE SEQUENCER )¢4 SOUNDS BUSYFLAG¢4 SOUNDS SEQUENCELENGTH¢4 SOUNDS CURRENTSTEP¢4 SOUNDS SEQUENCEPOINTER ( WHICH ARRAY PROVIDES VALUES FOR V/P/D )¢