Program Challenge (was Re: z80 timing... 6502 timing)

From: Fred Cisin <cisin_at_xenosoft.com>
Date: Mon Apr 19 16:44:29 1999

> ADD DS, AX

Sorry, that shouldn't have gone to the list, and was WRONG!

Instead:
; 12 bytes of code; no stack; 64K static data
;entry condition:
; AX contains number
; validity is tested. (0,4000-4095 have *'s, >4095 caught)
; DS contains location of data segment
; content of data segment same as before
;exit condition:
; DS:0 points to result
; AX, BX, DS, and flags get stepped on

        TEST AX, 0F000h
        JNZ BOGUS
        MOV BX, DS
        ADD AX, BX
        MOV DS, AX
BOGUS:
        RET
Received on Mon Apr 19 1999 - 16:44:29 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:31:44 BST