þþA+dX;File:DT1.EQUnX;Copyright (c) 1989 ByxX;James C. Dillow‚X;ŒX;the folling equs are for– X;DeTerm v1.59 only. Some may !X;change or remain the same inª X;furture.´X;¾ X;A second equ file is in theÈX;making. It will containÒ$X;equs for the different sectionsÜ"X;in DeTerm. Make sure you grabæX;them (around 4-25-89).ðEIú„LEFTR;;left matgin…RIGHTS;;right margin‡CURCOLWU;;current col†CURROWT;;current row"†SAVMSGX;;screen pointer,†UNDCUR];;chr under cursor6‡CURSORWð;;cursor on/off@‡ZCURADR^;;screen adrJ„ZADRh;;dittoT²^ƒTOP ;;top marginh†BOTTOM ;;bottom marginrX;|#X;chr to replace when using edit†!X;control keys. Must be screenX;value, eg zero [0] equalsš X;a space¤‡REPLACE ®X;¸X;scroll on/off flag. StopsÂ!X;screen scroll when at bottomÌX;margin. Poke with non-zeroÖX;value to stop.à†SCROLL êX;ôX;set prior to callingþX;readscreen, pads stringX;with replace (after it isX;converted to chr value)."X;readscreen resets to zero [0]& X;on exit0ŠFILLSTRING :X;DX;set to $80 if you wantNX;background inverse. ZeroXX;is no inverse. Set beforeb!X;calling Dowindow if you wantl#X;your window in inverse (bordervX;and background).€ˆINVERSEW ŠX;”X;set to $80 if you want allž!X;chrs in inverse when printed¨#X;to screen. Zero is non-inverse²‡INVERSE ¼‚WN ;;current windowÆ X;number of window.max is setÐ X;at seven so do not go over.Ú‡WINDOWS äX;î#X;set to non-zero when term modeøX;is on. Window routine actsX;a little different ‰TERM_STAT  X; X;term word wrap. Zero value* X;is off.4 „WRAP  >X;H$X;a second counter. Counts to 255R"X;then wraps to zero. Set jiffs\!X;to zero if you want a littlefX;more accuracy.p‡DE_SECSz„SECS  ;;sec counter„„MINS  ;;min counterŽ…HOURS  ;;hours counter˜…JIFFS ;;jiff counter¢X;¬ X;which tranlation. Currently¶#X;zero equals ascii and non-zeroÀ X;is atari. It will change inÊ X;the furture. Oh yes, DeTermÔ"X;is always in Atari tranlationÞX;as far as any handler isèX;concerned, DT does its ownò$X;tranlation (uses chr as a indexüX;to a trans table).…TRANS X;duplex. zero is full. „PLEX $X;."X;baud rate. currently there is8X;only five values:0->4.BX;when openmodem is calledL!X;the value in BAUD is used asVX;a index to baud value a`X;interface uses.j „BAUD tX;~X;non zero value means editˆX;window is on. The edit’#X;window is window number six soœX;do not use that window or¦X;call Unwindow while it is° X;active.º…CHEAT ĆPARITY ;;parity valueÎ"X;set to input channel times 16؆INCHAN â#X;set to output channel times 16ì‡OUTCHAN ö"X;status value after disk readsX;or any other device called X;from copyin†STATIN X;(#X;status value after disk writes2X;or any other device called<X;from copyoutF‡STATOUT P!X;buffer lenght. Set to numberZX;of chrs to output beforedX;calling copyout. HoldsnX;number of chrs read afterxX;you call copyin.‚‡BUFFLEN ŒX;pointer to buffer you will–X;read or write to/from. Set X;before calling copyin orª X;copyout.´‡BUFFADR ¾X;used only during xfers.È…XTYPE ÒX;ÃÉÏ ÅñõáôåóÜ „CIOVVäæ‡COMMANDBð‡CIOSTATCú‰CIOBUFADRD‰CIOBUFLENHX; ƒCIXò" ƒINTÔ, ƒFR0ƒINT6 †INBUFFó@ˆCLI_BUFF€J†MEMTOPåT …MEMLOç^ „APHIh „LASTür‡CONSOLEÐ| …PORTBÓ†‡CAS_VECX;šŠRETURN_PAR ¤ …PASS1£® …PASS2¤¸ …PASS3¦Â …PASS4¨Ì …PASS5ªÖX;à „DDEVê …DDEV4@ô …DDEV5Pþ „RDEV  „KDEV0 „PDEV  ƒEOL›& ƒEOF†0X;:X;DˆGAMELISTPºNŠGAMESCREENˆGAMELIST XˆASCII_IN¼€b‡VEC_ORG¼lX;vX;a 1200 byte window buffer€X;is available, please doŠX;not exceed.”ˆWIN_BUFFˆGAMELISTZž‡WIN_ORGˆWIN_BUFFÀ ¨ˆTERM_ORG‡WIN_ORGÅ ²ˆMAIN_ORGˆTERM_ORGE¼‰ASCII_TABˆGAMELISTƉTLIST_ADR‡VEC_ORGЇMOD_PTR‰TLIST_ADRÚˆTERMLIST‡MOD_PTRä„TZIPˆTERMLIST'îˆWIN_VECS„TZIP ø‰TERM_VECSˆWIN_VECS ‰MAIN_VECS‰TERM_VECS  ŠTERMSCREENˆMAIN_ORGb„CSRNŠTERMSCREEN( ˆBOOT_ORGŠTERMSCREEN*X;4€>‰FIRST_BLK HˆBATCH_ON R‡BUFFCTR \ „XCTR fX;p X;current xfer block attempt.zX;this value is printed in„X;xfer status windowŽ…TRIES ˜"X;checksum. Init before calling¢ X;xdata.¬…CKSUM ¶…READY ÀX;ÊX;current xmodem blockÔ…BLOCK  ÞX;è X;last xmodem block received.ò‡LASTBLK  üX;block xfer routine should X;expect ‰EXPECTBLK   X;block count that is printed$ X;in xfer status window.. †UBLOCK  8 †IF_CRC B X;Zpage varablesL ƒPTR;;Just tempV ‰SCREENPTRƒPTR` ‡BUFFPTRƒPTRj ˆNUMCHARSƒPTRt ‡SCRNINXƒPTR~ …INDEXƒPTRˆ …XROWSƒPTR’ ‡NUMROWSƒPTRœ †BUFINXƒPTR ¦ ‡LISTPTRƒPTR ° "X;capture on if non-zero value.º ‡CAPTUREƒPTR Ä !X;block size used during xfersÎ ‡BLKSIZEƒPTRØ X;â X;which nak to look for.ì ‰WHICH_NAKƒPTRö X;number of 128 byte seqments "X;in one xfer block. Set before X;calling xdata. …Z128SƒPTR X;( !X;got first block if non-zero.2 ‰GOT_FIRSTƒPTR< X;F X;number of secs to wait forP "X;a chr before timing out. UsedZ X;only during xfers.d ‡BETWEENƒPTR n X;get job equate filex X;Óïíå ×éîäï÷ Öåãôïòó‚ X;Œ X;steal E: table & init– X;windowing  …INITWˆWIN_VECSª X;´ X;replace E: vecs¾ ‡UNINITW…INITWÈ X;Ò X;set up a windowÜ X;areg=# colums xreg=# rowsæ X;yreg=colum position of topð X;left corner of main screenú X;pass1=row position !X;Colums and rows are numbered #X;zero to values in areg & xreg. X;right, left, top , and" X;bottom margins can be set, X;within each window.6 X;To get an inverse window@ X;set var:InverseW to $80J ˆDOWINDOW‡UNINITWT X;^ X;undo window and replaceh X;with old info. Resetsr $X;inverse,inverseW,curcol,currow,| X;replace, left,top to zero,† #X;bottom and right to value last X;window Dowindow placed onš X;screen. If no window is¤ X;active then this command® X;is ignored.¸ ˆUNWINDOWˆDOWINDOW X;Ì X;areg= low byte string addrÖ X;xreg= high byteà X;position colum and rowê X;befor entering. On exitô X;first byte of string holdsþ X;lenght. ŠREADSCREENˆUNWINDOW X; X;get byte from keyboard& X;channel=KDEV0 „GETKŠREADSCREEN: X;D "X;enter info from KDEV and echoN X;to Putw (active window)X "X;exit if return or select keysb X;pressed. areg=0 if selectl X;or if the return key wasv "X;pressed before any other key.€ ‡KEYSOME„GETKŠ X;” X;activate a window.ž X;areg=window to activate¨ X;Like Unwindow Act resets² X;defaults. (left, top, etc).¼ ƒACT‡KEYSOMEÆ X;Ð X;put areg to active windowÚ X;but do crc or xmodemä X;checksum first.var:IF_CRCî X;positive (less than 128) ifø "X;you want to use CRC checksum. !X;all Atari edit chrs ignored. …PUTWHƒACT X; X;put a byte to active* X;window but checks for edit4 "X;keys first.To get inverse chr> "X;output set var:Inverse to $80H X;Note:When a clear screenR X;edit chr is sent to putw\ X;the screen is cleared withf X;value in var:replace.p X;eg zero is normal clear,z X;63 (screen code '_ ) clears„ X;screen with underlines.Ž „PUTW…PUTWH˜ X;¢ X;Ôåòí öåãôïòó¬ X;¶ X;call with areg=capture toÀ X;disk, xreg=type of fileÊ X;transfer (xmodem,ymodem..),Ô !X;yreg delay rate, pass1=if toÞ X;use disk, pass2 & pass2+1 =è X;low & high byte of bufferò X;address, pass3=low & highü X;byte of buffersize (just!X;high byte is currently used)X;pass4=if a connection was!X;made while dialing from list$†DOTERM‰TERM_VECS.X;8X;set vars:buffadr, bufflen,BX;chanout before callingLX;var:statout reflects cioVX;return status.`‡COPYOUT†DOTERMjX;tX;set vars:buffadr, bufflen,~X;chanin before calling.ˆX;statin reflects cio’X;return status.œ†COPYIN‡COPYOUT¦X;°X;opens modem with currentºX;settings. Does not startÄX;current IO. On return aregÎX;equals zero if no carrier؉OPENMODEM†COPYINâX;ìX;status command whileöX;concurrent IO activeX;areg=number bytes in X;input buffer‡STATUSR‰OPENMODEMX;(X;areg=command, xreg=aux12X;yreg=aux2<ˆXIOMODEM‡STATUSRFX;PX;enter with areg set to:Z"X;'A toggle alternate xfer scrndX;zero turn game offnX;negative:just flipxX;else:new game‚‹TOGGLE_GAMEˆXIOMODEMŒX;–X;init all clock values X;then call enable_vbªˆGETSPACE‹TOGGLE_GAME´X;¾X;print term clockÈ…PTIMEˆGETSPACEÒX;ÜX;enable my imed vb. ReturnsæX;with y-reg=low byte andðX;x-reg=high byte of sharedú X;imed vb.‰ENABLE_VBˆTERM_ORGX;X;Print macros. A-reg=index."X;grabs macro address from, X;table.6‰PRINTMACS‰ENABLE_VB@X;JX;get a byte of data fromT X;device. x-reg=channel times^X;16. A-reg holds data onh X;returnr†GETDEV‰PRINTMACS|X;†X;put data to device.x-regX;equals channel times 16šX;A-reg holds data to put to¤ X;device®†PUTDEV†GETDEV¸X;ÂX;Íáéî öåãôïòóÌX;Error Time window. y-regÖX;holds error value.à‡MYERROR‰MAIN_VECSêX;ôX;load buffer. Enter withþ X;x-reg init to channel timesX;16. Inits bufflen, buffadrX;then pops a window andX;prints Loading Buffer.&X;see vars:bufferm ,maxbuffm0X;bufferc and maxbuffc:‰LOADBUFFM‡MYERRORDX;NX;save buffer. Enter withX X;x-reg init to channel timesbX;16. Inits bufflen, buffadrl X;then pops window and printsvX;Saving Buffer.€ X;see vars:bufferm, maxbuffm,ŠX;bufferc and maxbuffc”‰SAVEBUFFM‰LOADBUFFMžX;¨#X;Opens a file. Init Var:outfile²!X;before calling. areg=command¼X;x-reg=channel times 16ÆX;on return y-reg holdsÐ X;status.ÚX;Íéóã Ôåòí ÅñõóäX;î X;array holding contorl shiftø"X;key chrs. There are 15 (0-14)X;keys available but all are X;used except last five on!X;boot. If a an array position X;holds a '+ then it is*X;available for user, else4 X;no go.>ŠSHIFT_KEYSw¦HX;R#X;Address table of control shift\$X;routines. Each address is minusfX;one of the actual routinepX;entry, DoShifty vectors toz X;routines by pushing address„!X;onto stack then doing a RTS.Ž‰SHIFT_ADR†¦˜X;¢ X;to install your own control¬X;shift routine:¶X;ÀX; ldx #14ÊX; lda #'+Ô X; ldy #4ÞX; loop_searchèX; cmp shift_adr,xòX; beq got_oneü X; dex X; deyX; bpl loop_searchX; bmi exit_search$ X; got_one."X;Note:make sure key is a valid8X;contorl shift key beforeBX;you save it.LX; lda #my_keyVX; sta shift_keys,x` X; txaj X; asl at X; tax~X; lda #my_routineœX; sta shift_adr+1,x¦X;exit_search° X; rtsºX;ÄX;toggle capture. If on thenÎ X;turn it off, if off turn itØX;on.âŠTOGGLE_CAP[§ìX;öX;dito with edit‹TOGGLE_EDITŠ¥ X;X;turn edit window on alwaysˆSET_EDIT’¥(X;2 X;turn edit window off always<†UNEDIT¦¥