Jump to content

JamesD's Photo

JamesD

Member Since 20 Aug 2006
ONLINE Last Active Today, 7:00 AM

Topics I've Started

GET and PUT source (Compute magazine)

Tue Feb 7, 2012 4:57 AM

Compute magazine publish source to GET and PUT functions in assembly language.
The article was in issue 91, December 1987
The original source hid part of the assembly as just bytes, but I hand disassembled that part of the code and included it.
It's bound to have errors in the disassembly and the branches need labels, but I thought I'd pass on what I had in case someone has a use for it or wants to finish what I started. See the article for full details.
FYI, some instructions start in one BYTE statement and finish in the next. Tabs may have gotten eaten by the look of the code.
;Compute Issue 91 Dec 87
XLSB = 214
XMSB = 215
YLSB = 216
YMSB = 218
LENGTH = 219
BYTESLSB = 220
BYTESMSB = 221
IMAGELSB = 222
IMAGEMSB = 223
CMD = 224
*= $FFFF ;Place your program's beginning assembling address here
JMP BEGIN
GET LDA #0
JMP GP
PUT LDA #1
GP STA 227
.BYTE 169,0,133,212,133,213,1
LDA #0
STA 212
STA 213

.BYTE 214,133,225,165,89,101,215,133,226,162
OR (XLSB,X)
STA 225
LDA #89
ADC XMSB
STA 226
LDX #0

.BYTE 0,228,216,240,32,165,225,24,101,220
CPX YLSB
BEQ #32
LDA 225
CLC
ADC BYTESLSB

.BYTE 133,225,165,226,101,221,133,226,165,215
STA 225
LDA 226
ADC BYTESMSB
STA 226
LDA XMSB

.BYTE 56,233,1,133,216,165,217,233,0,133
SEC
SBC #1
STA YLSB
LDA 217
SBC #0
.BYTE 217,169,0,201,0,240,220,228,217,240
STA 217
LDA #0
CMP #0
BEQ #220
CPX 217

.BYTE 6,169,0,201,0,240,214,162,1,160
BEQ #6
LDA #0
CMP #0
BEQ #214
LDX #1

.BYTE 0,196,218,240,81,165,227,201,1,208
LDY #0
CPY YMSB
BEQ #81
LDA 227
CMP #1

.BYTE 55,165,224,201,1,208,22,177,222,201
BNE #55
LDA CMD
CMP #1
BNE #22
LDA (IMAGELSB),Y
.BYTE 0,240,10,177,225,201,0,240,4,169
CMP #0
BEQ #10
LDA (225),Y
CMP #0
BEQ #4
.BYTE 1,133,212,177,222,201,0,240,20,165
LDA #1
STA 212
LDA (IMAGELSB),Y
CMP #0
BEQ #20

.BYTE 224,201,1,240,10,177,225,201,0,240
LDA CMD
CMP #1
BEQ #10
LDA (225),Y
CMP #0
.BYTE 4,169,1,133,212,177,222,145,225,200
BEQ #4
LDA #1
STA 212
LDA IMAGELSB
STA (225),Y
INY

.BYTE 169,0,201,0,240,191,177,225,201,0
LDA #0
CMP #0
BEQ #191
LDA 225
.BYTE 240,6,169,1,133,212,177,225,145,222
BEQ #6
LDA #1
STA 212
LDA 225
STA (222),Y

.BYTE 169,0,201,0,240,229,228,219,240,35
LDA #0
CMP #0
BEQ #229
CPX 219
BEQ #35

.BYTE 160,0,165,222,24,101,218,133,222,165
LDY #0
LDA IMAGELSB
CLC
ADC YMSB
STA IMAGELSB
LDA IMAGEMSB

.BYTE 223,105,0,133,223,165,225,24,101,220
ADC #0  ;add the carry bit
STA IMAGEMSB
LDA 225
CLC
ADC BYTESLSB

.BYTE 133,225,165,226,101,221,133,226,232,169
STA 225
LDA 226
ADC BYTESMSB
STA 226
INX
LDA #0
.BYTE 0,201,0,240,191,96
CMP #0
BEQ #191
RTS

;Begin your assembly language program at line 1400
; To use the routine, just store your values into the appropriate variables and do a 'JSR GET' or 'JSR PUT'
BEGIN

Top-selling home console worldwide

Mon Feb 6, 2012 7:28 PM

http://www.geekwire....ly-global-sales

"Microsoft’s Xbox 360 has been dominating its home turf for the past couple of years, sitting atop the monthly sales charts for the U.S. video-game console market, but the Redmond company has just taken the title of top-selling home console worldwide, as well.
Sony’s earnings report, issued yesterday, puts the PlayStation 3 at 6.5 million units sold worldwide for the holiday quarter, topping the 5.6 million units registered by Nintendo’s Wii for the same period — but falling short of the 8.2 million Xbox 360 sales reported by Microsoft.
According to data compiled by GeekWire, it’s the first time that the Xbox 360 has led worldwide holiday sales since 2006, when the PlayStation 3 and Wii were just being launched, posting a partial quarter and not yet ramping up their manufacturing to meet demand.
Here’s the bigger news: The Xbox 360′s strong holiday quarter also put the Microsoft console ahead in worldwide sales globally for the full year of 2011, with 14.9 million units sold, compared with 14.1 million for the PS3 and 10.33 million for the Wii.
According to our data, compiled from historical earnings reports, it’s first time the Xbox 360 has topped the worldwide console market for a full year of head-to-head competition with the PS3 and Wii.
Microsoft’s surge reflects the strong reception for the Kinect motion sensor and the expansion of the console as a home entertainment device, enabled by regular software updates.
Don Mattrick, the Microsoft video-game chief, had predicted last year at the E3 conference that Xbox 360 would become the No. 1 console globally.
On a cumulative basis, Nintendo is still the king of the current console generation, with 95 million Wiis sold worldwide, compared with 66 million Xbox 360 for Microsoft and 62 million Ps3s for Sony."

Microsoft beats estimates, Windows profits fall

Fri Feb 3, 2012 8:06 PM

http://www.geekwire....profits-fall-11

My feelings exactly!

Thu Jan 19, 2012 11:34 AM

I feel this way every time I play an old Zelda game:
http://www.youtube.c...d&v=lzBjnIjAPEQ

VUDU now available on Xbox 360

Tue Dec 20, 2011 8:28 PM

Just got the email announcing VUDU for the 360. Yes it requires a Gold account.
<edit>
If you set up a new account they give you a $4.99 credit.