Real fun - Arrow interface.

Funeral #01
                                          
 "ARROW" TYPE INTERFACE   
       BASIC ALGORITHM.      
                                          
(C) JASON "NECROPHILE" KRUEGER            
__________________________________________
                                          
recently in Russia the greatest
an interface like
"Strel- ka". We would like to offer you a general al- the algorithm of the interface through which you You can easily write your own program. So, let's get started. At the entrance: Suckers with money, you without money. Output: You have money, suckers - without money. 1.Find suckers with money. 2. Hit the arrow with it. 2.1 LD HL,0 PUSH HL (stack will be needed for internal needs) 3.Come to the arrow. 4. If the suckers didn’t come, then find the suckers from- beat and go to step 9 5. If the suckers came alone, then tell the suckers, that they are suckers. 6.If the suckers agree, thengo to p.9 7. If the suckers don’t agree, then justify suckers that they are suckers, beat up the suckers and move on onp.9 8. If the suckers came with divorce deductibles, then 8.1 Check the adjustable ones. 8.2 If the divorce ones are thieves, then forget about suckers and go to p.1 8.3 If divorcees are suckers, then: LD HL,LRAD ;Address of suckers-divorce- ; PUSH HL ;Put on the stack. 9. Put the suckers on the dibs, turn on the count- chick. 10.Perform the procedure: VARIABLES: BABKI1 - money brought suckers BABKI2 - money that suckers must COUNTER - counter (sum in day) BEGIN LD В,31 ;number of days. LD HL,(BABKI2) ;long. LD DE,(COUNTER) ;счетчик. LOOP ADD HL,DE ;складывают- ;ся, LD (BABKI2),HL ;сохраняется, LD ВС,(BABKI1) ;To,что лохи ;принесли. PUSH HL ;HL - на стек ;(будет ме- ;няться) SBC HL,ВС ;Разница меж- ;due to duty and ;because suckers ;brought. JR NZ,NEXT ;If different ;tsa <> 0, then ;nobtpoutb. POP HL ;Notherwise clear ;thick stack LD HL,P14 ;and exit PUSH HL ;on P.14 RET ; NEXT POP HL ;Это и так DJNZ LOOP ;понятно... LD (BABKI2),HL ;Месяц про- CALL P11 ;шел,а денег JR BEGIN ;нет... BABKI1 DEFW 0 BABKI2 DEFW 0 COUNTER DEFW 0 Очистка 11.Beat the suckers. 12.Take a soldering iron and an iron, torture the suckers. 13.RET (return to procedure step 10) 14. Checking for the presence of scammers (their the address is on the stack) POP HL ;Stack contents in ;HL LD A,H ;Check OR A ;If the stack is not 0, JP NZ,P2 ;then shake from them. XOR A ;For system LD VS,327b5 ;128 KB OUT (C),A ;(ON 128 ROM) RST 0 ;Output. That's basically it. Algorithmof course, can be optimized, for example, not checking cheating on suckers, but this is undesirable but, since the machine code of thieves can generate in your support procedure life in the following sequence: DI HALT Preferably the sameinsert check lo- khov and divorced for politness. Otherwise in va- our life procedure can generate to be: At best - a cycle LD B,10 (number of years) LOOP DJNZ LOOP RET Either LOOP JR LOOP At best - a cycle LD B,10 (number of years) LOOP DJNZ LOOP RET Either LOOP JR LOOP And in the worst case - the same: DI HALT (Although the second option according to the result is not much different from the third). That seems to be all. Happy rack! ta... RET

Share your thoughts about the article