Rem Merge Poke Data For Rem Ml Sort Routine Here Rem

DATA 162,28,181,179,157,224,3,202 DATA 208,248,169,0,133,212,133,213 DATA 104,201,6,240,13,170,104,104 DATA 202,208,251,162,1,134,212,24 DATA 144,37,104,133,183,104,133,182 DATA 104,104,133,184,104,133,186,104 DATA 133,185,104,104,133,187,198,187 DATA 133,180,104,104,133,188,198,188 DATA 104,104,133,189,24,144,11,162 DATA 28,189,224,3,149,179,202,208 DATA 248,96,162,2,165,182,201,0 DATA 208,4,165,183,240,191,232,165 DATA 184,208,4,165,185,240,182,232 570 DATA 165,185,208,8,201,1,208,4 580 DATA...

Lda Sta Sta Pla Cmp Beq Tax Pla Pla Dex Bne Rts

MAKE SURE THERE ARE NO MORE THAN THREE ARGUMENTS

Chapter Seven

Using Strings PEEKs, POKEs, and Blanking a String Stripping Trailing Blanks from a STRIPPER.LST SUBROUTINE Justifying and Centering Strings RIGHT.LST Left Justifying a String LEFT.LST SUBROUTINE Centering a String CENTER.LST The Last Shall Be First and The First Shall Be Last 88 REVERSE.LST SUBROUTINE Peeling Words Off of a String PEELOFF.LST Massaging an Unruly Converting a Lower Case String to Upper Case 90 LOWTOCAP.LST Inverting the Characters in a String INVERT.LST SUBROUTINE Messing Around...

Rem Slowlistbas Rem

120 REM THIS IS THE VBI SETUP ROUTINE 130 REM THAT IS TEMPORARILY STORED ON 140 REM PAGE FOUR. 0400 1024 DATA 164,3,142,11,6,140,12,6 DATA 169,5,133,2,169,6,133,3 DATA 173,34,2,141,51,6,173,35 DATA 2,141,52,6,165,9,9,2 DATA 133,9,162,6,160,53,169,6 DATA 32,92,228,104,96 REM NOTE THE NUMBER '104' IN LINE REM 210 IS ONLY IN THIS BASIC REM VERSION. IT IS NOT IN THE REM BINARY LOAD FILE VERSION MLSTART 1024 MLEND 1076 FOR X MLSTART TO MLEND READ Y POKE X,Y NEXT X REM THIS IS THE MAIN ROUTINE REM IT...

Then Gosub

RETURN Here is an example of LOWTOCAP.LST Set WORD John Paul Jones. GOSUB 20190 returns WORD JOHN PAUL JONES. Inverting the Characters in a String The second special case is converting all the inverted characters in a string to non-inverted characters. INVERT.LST is a subroutine that will convert all normal characters into inverted ones or vice versa. The string to be inverted must be stored in WORD , and the flag variable INVERT must be set to 0,1 or -1. If INVERT 0, then only inverse...

Find a Day of the Year

Here is a subroutine that computes the day within any year from 1901 to 2099. You simply provide the four digit year, the month and the day of the month. FIND AY.LST takes into account whether or not a year is a leap year. 20281 REM MONTH,DAY,YEAR, amp STRINGS 20285 IF YEAR 4 INT YEAR 4 AND M0NTH gt 2 THEN NUMBER NUMBER 1 If you look carefully at this subroutine, you will see that the day number is computed first by figuring the number of preceding months multiplied by 28 days. Next a table is...

FREE SECTORS Tgf

The following paragraphs give you a brief description of each program. Application Programs convert.bas This is a UTILITY that converts a machine language binary load file into BASIC DATA statements. The resulting DATA statements are automatically LISTed to either cassette or disk. This program actually creates an entire subroutine for POKEing a machine language routine into memory. For more details see page 39. DATAPAK.BAS This UTILITY is similar to CONVERT, but it is for the more advanced...

Special Effects Routines

Here is one last demo program for you to try before we get into the sound effects routines. This demo shows you some of the strange effects you can get with static sound by making use of waveform interference effects. I won't try to explain them here. Try them and see what you think. Figure 1 4.7 Sound Effects Demo Number Two 100 REM S0UND2.DEM 110 POKE 752,1 PRINT CHR 125 SOUND 0,0,0,0 DELTA 1 120 POSITION 8,2 PRINT SOUND EFFECTS DEMO 2 130 POSITION 11,11 PRINT PADDLE 0 REM POKE 53768,4 140...

Controlled Keyboard Input Routines

The routines in this section will work very well with the formatted input routines in the next chapter. In this section, we will concentrate on how to get multi-key inputs from the keyboard without using the INPUT command. Many applications require the user to input a string of characters, such as a person's name, in response to a prompt. The routine in Figure 11.9 illustrates a simple, but effective technique for this purpose Figure 11.11 INKEY1.LST-Controlled String Input 20550 REM INKEY1.LST...

Good Habits to Form

You now know the general approach to use when developing a program, but there are some other things that you may need more guidance on. For example, I am sure that you have heard the term backup before. This term refers to more than just making an extra copy of a completed program. It is an essential tool that every serious programmer should use in the process of developing a program. I have no sympathy for the programmer who cannot meet a deadline because the only copy of my source was stolen...

Fscrolllst

GLOWING Message Routine 182 GRAPHICS 2 Sample Title 182 - Auto-Scan Mode 76 Hexadecimal-to-Decimal Conversions 75 HH MM SS 112 Hours, Minutes, and Seconds 113 House flies 219 How to Load Execute USR Routines 37 Interleaved methods 68 Interleaved Overlay 67 Inverting the Characters in a String 90 IOCB with Machine Language 202 Keyboard Input Routines 159 Keyboard Menus 154 Keyboard 158 Key 131 Klaxon siren 222 Knuth, Donald E. 135 Minimizing Program Execution Time 29 Negative numbers pos. and...

Boolean Operators Logical Building Blocks

Boolean operators, which take their name from the famous mathematician George Boole, are a set of mathematical relationships that are used to perform logic operations. Such logical or Boolean operators enable a programmer to easily program logic functions into a program. There are four fundamental Boolean operators or, and, not, and the often confusing exclusive OR, xor. The exclusive OR is sometimes abreviated eor instead of xor. We will discuss each of these operators in more detail and show...