SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : Microsoft - The Evil empire
MSFT 398.09+1.1%11:23 AM EST

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Columbo who wrote (156)10/29/1997 11:44:00 AM
From: Typhoon  Read Replies (1) of 1600
 
Hi Columbo. See you're having fun as well. Here's one of my favorite code fragments.
The best part is that it runs great without an operating system.
We could have a fun game of "guess the processor".
Very few people would be able to guess this one.
This fragment contains an unnecessary instruction, but it still works.


OVER: MVI A,0
STAW ECNTCUR ;CLEAR ERROR COUNT HOLDING REGISTER

LDAW PNTCNT
MOV C,A ;POINT COUNTER

MXP: LDAX D+ ;GET SCALED DATA POINT
MOV B,A ;COPY TO B
LDAX H ;GET MAX TABLE POINT
DCR C
NOP
SUBNB A,B ;A <- A-B MAX-DATA
JMP MER ;SKIP THIS INSTR IF OK
JMP GHI
MER: LDAX H ;GET MAX POINT AGAIN
SUBNB B,A ;B <- B-A DATA-MAX
NOP
MOV A,B ;RESULT IN B, PUT BACK IN A
;UPDATE ERROR SUM:
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext