Learning to code things - elegant screen cleaning.

Impulse #08
   
                                                              
Учимся кодить "ВЕСЧИ" !
(Ц)MAXIMKA IGoMATKA
Приветствую тебя мно- гoувaжaемый читaч газеты IMPULSE. С этого номера, я в этой рубрике буду вести перспективный и грамотный флейм на тему o программировании на languages of the lowest level, and also teach you how
it is sensible and honorable to break and build advanced and super-duper sophisticated algorithms. You can weigh the data use at home, work and other hot places.
Procedure `CLRSCRCUL` graceful screen clearing: (by the way, it's fucking :) ORG 16384 LD Н,64 ;high byte of the beginning ekpaha LD L,#0 ;position 0 PUSH HL ;change to SP address ;#4000,SP is reduced by 2 LD B,175 ;175 lines in vertical calm. HERE PUSH BC ;push 175-L onto the stack. PUSH HL LD A,L ;hahocmm in A code beginning of lines. LD C,0 ;zanosmm in C value 0, vertical field CALL 8880 ;8880 is the procedure mz noptatmbhoro ;storage device ADD A,A ; CAX RRA ; --- multiply by 8, logical "A". ADD A,A ;/ LD (HL),A ;-save it in cell HL SR #00 ;check on the contents of the included 6mtob. JR NZ,CAX ;transition if there are lighted battlefields, to the CAX address LD E,32 ;promzvodmm nested CMCL BAC LD (HL),A ;save value a in cell HL LD BC,0 ;loading value into BC ;algebraic constant 0 DEC BC ;logical action, BC<>65536(0)=>BC=65535 0R A ;resets the red flag KERRI INC HL ;increased ordinal ;index cell numbers HL DEC E ;logical action with E JR NZ,BAC ;well, everything is clear here BIT 7,(IY+124) ;check 6mta 23610+124. POP HL ;discarded from the HL stack. POP BC ;also m c BC INC HL INC B ;action for yctahobkm I/O flags DEC B ;/ DJNZ HER
POP HL LD DE,16385 LD BC,6911 LD (HL),L LDIR DI RET Последняя процедура нужна для окончательного качественного очищения экрана. T.к. экран устроен так, что он не всегда может oчищaтся с первого раза. Рекомендую также для полной работоспособности в рег. #1F ВГ`шки записать #DF, и на SCORPION`e disable all expansion ports. Let me say goodbye to this, I’m waiting You in the next issue, I will introduce mine article and the fastest algorithms, article called: Universal procedure printing font 32*24 familiarities. BYE,GUYZ and GIRLS! Si Yu in New Releases from Rom Mi...

Share your thoughts about the article