6502 Machine Code For Humans

6502 Machine Code For Humans

Alan Tootill, David Barrow

Language: English

Pages: 156

ISBN: 2:00254002

Format: PDF / Kindle (mobi) / ePub


Machine code is the language of the processor at the heart of your computer system. Unlike many other books on machine code, this book does not systematically explain the operation of each instruction in excessive detail. Instead, it presents you with simple, understandable tasks in computing that are carried out by groups of instructions (routines). Each task is described, the method explained, and sufficient documentation given for you to work through the routines and see the part played by each instruction.

SharePoint 2010 Enterprise Architect's Guidebook

New Perspectives on Microsoft Excel 2013, Comprehensive

The Gamification Revolution: How Leaders Leverage Game Mechanics to Crush the Competition (1st Edition)

C Programming Absolute Beginner's Guide (3rd Edition)

 

 

 

 

 

 

 

 

 

 

 

 

Address at the bottom left screen character position, a character (in place of line) high index of 0, a line (in place of character) high index of 39 ($27), a character byte difference of 40 ($0028) and a line byte difference of I ($000 I). With a suitable prompt message string set in RAM, the routine can be entered: PRMPT - Print a circular message until a character is given from the keyboard Subroutines - PSHZM, STRNG, TFRZZ, INKD, PSLCT, PULZM, PARAM, STTMP, LDTMP, GETCH, ADCZI, AUTOP, HOME,.

;and current display ;information on ;the user stack. ;get display area I ;into the current ;display area ;and store ;it all ;on the ;processor stack. ;input char count. ;set carry for string ;start and recover ;display area 10 ;parameters and inf ;from user stack. ;get prompt me5sage ;no., display prompt. ;after input, store ;updated display inf ;and current area on ;the user stack. ;recover display ;area I ;and current ;information A9 20 A9 20 20 22 20 28 A9 20 A2 B5 48 CA 10 AO 38 20 28 20 22.

00 E2 13 30 3E 03 10 10 FF 3E hi hi CD OE 25 FE 10 45 F9 42 F5 hi 70 6502 Machine Code for Humans #61 SBC ASL A PLP BCS CCNX JSR REXG BNE CCWZ CCNX BNE CCNS TAX LOA #8 RTFR CCNS JSR LOA #0 CCWZ CCAMW BEQ ;test operators =, +, -, *, /. Now CCNSW CMP #5 BEQ CCENO PHA LOA AMO BEQ CCBCL LOA #10 JSR REXG DEC AMO BNE CCST JSR CALCA DEC CCST AMO BNE CCMT JSR CALCS DEC CCMT AMO BNE CCOT JSR CALCM DEC CCOT AMO BNE CCBCL JSR CALCO BCC CCBCL LOX #8 JSR RCLR LOA "E" (UAL),Y STA GETCH CCZLP JSR CMP.

07 FF 34 36 08 OA E9 10 05 01 01 09 20 hi 96 6502 Machine Code for Humans LSR INY MDPL SEC SBC BCS ADC PHA CLC LDA ADC STA CLC LDA ADC STA PLA SEC BCS MDMG PHA CLC LDA ADC STA PLA JSR MDCP DEY BNE MDWND JSR EQB RTS A VAL MDMG VAH PLTX VBL PLTX PLTY UBH PLTY MDCP PLTX,X UBL,X PLTX,X MPLOT MDPL PVLZM $04,$FF ;step count. Y is the ;greatest diff counter. ;Ioop: subtract lesser ;diff from step counter, ;skip if subtract okay ;else below 0 so add ;greater diff to step ;counter and step both.

Arrays. address of display { area parameter tables. cursor character index. Display information cursor line index. cursor character { byte displacement. cursor line { byte displacement. the home { address. character high index. The current display area 24 6502 Machine Code for Humans 2B 2C 20 2E 2F DLN DCDL DCDH DLDL DLDH 30 31 32 33 34 35 36 37 38 39 3A 3B 3C GOL GOH GXN GYN PLTX PLTY DRWX DRWY PLTM PLTR TLTX TLTY TFMC 30 3E 3F AMO AMW AML 10 hi 10 hi 10 hi line high index. {.

Download sample

Download