# HG changeset patch # User boisy # Date 1034188994 0 # Node ID 2a109644a3492caf06b39b37cbfcd7b4f2e9c6e5 # Parent 8c060694e3ca99ee2c7ddfd5dd923706eb10e8b1 Touched up script messages a bit diff -r 8c060694e3ca -r 2a109644a349 3rdparty/packages/basic09/basic09.asm --- a/3rdparty/packages/basic09/basic09.asm Wed Oct 09 17:32:25 2002 +0000 +++ b/3rdparty/packages/basic09/basic09.asm Wed Oct 09 18:43:14 2002 +0000 @@ -258,12 +258,12 @@ B09Major equ 1 B09Minor equ 0 - nam Basic09 - ttl BASIC for OS-9 - - ifp1 - use defsfile - endc + NAM Basic09 + TTL BASIC for OS-9 + + IFP1 + USE defsfile + ENDC mod eom,name,Prgrm+Objct,ReEnt+1,start,size @@ -478,11 +478,11 @@ L0024 fcb $0C fcc ' BASIC09' fcb $0A - ifne H6309 + IFNE H6309 fcc ' 6309 VERSION 0' - else + ELSE fcc ' 6809 VERSION 0' - endc + ENDC fcb B09Vrsn+$30 fcc '.0' fcb B09Major+$30 @@ -1569,25 +1569,24 @@ tfr a,dp Put into real DP stb $100,u Point to end of DP clra Clear all of DP to $00 @@ -1596,7 +1595,7 @@ cmpu ,s bhi L07C9 puls d Get start of data mem into D - endc + ENDC leau ,x Point U to Start of parameter area std key? bne L0915 No, exit routine with error - ifeq H6309-true -* ldq #$6279650d 'bye' - fcb $cd,$62,$79,$65,$0d + IFNE H6309 + ldq #$6279650d 'bye' stq ,y Stick it in the keyboard buffer - else + ELSE ldd #'b*256+'y Stick the word 'bye' into the keybrd buffer std ,y ldd #'e*256+C$CR ('e' + CR) std 2,y - endc + ENDC * Keyboard line read, no errors from ReadLn L08F8 ldx 2,s Get command tbl ptr back lda #$80 Mask to check for end of entry (high bit set) @@ -2502,12 +2500,12 @@ bcs L0E8B ldu L1D60,pc Point to Basic09 COMMANDS vector table ldd d,x Get offset jmp d,x Execute command's routine @@ -7490,12 +7488,12 @@ pshs y ldd <$11,x leay d,u - ifeq H6309-true + IFNE H6309 clrd - else + ELSE clra clrb - endc + ENDC bra L333F L333D std ,y++ @@ -7684,15 +7682,15 @@ std 3,y sta 5,y lbsr L3FB1 Increment counter (Do REAL add) - ifeq H6309-true + IFNE H6309 ldq 1,y Copy REAL # from 1,y to ,u stq ,u - else + ELSE ldd 1,y Copy REAL # from 1,y to ,u std ,u ldd 3,y std 2,u - endc + ENDC lda 5,y sta 4,u * Incrementing REAL STEP value @@ -7711,15 +7709,15 @@ lda #$02 Force it to REAL type ldb ,u Copy real # from u to y std ,y - ifeq H6309-true + IFNE H6309 ldq 1,u stq 2,y - else + ELSE ldd 1,u std 2,y ldd 3,u std 4,y - endc + ENDC rts L34A5 ldy 0, go do divide ldb #$2D =0, Divide by 0 error @@ -9281,7 +9279,7 @@ CheckZ3 clrw Clear out answer to 0 again bra CheckD1 Go deal with sign of remainder - else + ELSE * Calculate sign of result of Integer Divide (,y - 0=positive, FF=negative) L3EFD clr ,y Clear flag (positive result) ldd 7,y Get # @@ -9367,24 +9365,24 @@ std 7,y Save signed result L3F79 leay 6,y Eat temp var & return rts - endc + ENDC * Copy REAL # from X (moving X to after real number) to temp var L3F7C leay -6,y Make room for temp var ldb ,x+ Get hi-byte of real value lda #2 Force var type to REAL std ,y Save in temp var - ifeq H6309-true + IFNE H6309 ldq ,x Copy mantissa to temp var stq 2,y ldb #4 Bump X up to past end of var abx - else + ELSE ldd ,x++ Copy rest of real # to temp var & return std 2,y ldd ,x++ std 4,y - endc + ENDC rts * Copy REAL # from variable pool (pointed to by X) into temp var @@ -9396,43 +9394,41 @@ lda #2 Set 1st byte to be 2 ldb ,u Get 1st byte of real # std ,y - ifeq H6309-true + IFNE H6309 ldq 1,u Get mantissa for real # stq 2,y Save in temp var - else + ELSE ldd 1,u Get bytes 2&3 of real # std 2,y ldd 3,u Get bytes 4&5 of real # std 4,y - endc + ENDC rts Return * Negate for REAL #'s - ifeq H6309-true -*L3FA4 eim #1,5,y Negate sign bit of REAL # -L3FA4 fcb $65,1,$25 - else + IFNE H6309 +L3FA4 eim #1,5,y Negate sign bit of REAL # + ELSE L3FA4 lda 5,y Get LSB of mantissa & sign bit eora #$01 Reverse the sign bit sta 5,y Save it back - endc + ENDC rts return * Subtract for REAL #'s - ifeq H6309-true -*L3FAB eim #1,5,y Negate sign bit of real # -L3FAB fcb $65,1,$25 - else + IFNE H6309 +L3FAB eim #1,5,y Negate sign bit of real # + ELSE L3FAB ldb 5,y Reverse sign bit on REAL # eorb #1 stb 5,y - endc - - ifeq H6309-true + ENDC + + IFNE H6309 use basic09.real.add.63.asm - else + ELSE use basic09.real.add.68.asm - endc + ENDC * REAL Multiply? L40CC bsr L40D3 Go do REAL multiply @@ -9442,11 +9438,11 @@ L3C2C jsr 0, skip ahead @@ -9852,13 +9848,13 @@ L4591 ror 5,y Get sign bit of converted real # bcc L4599 Positive, leave integer result alone - ifeq H6309-true + IFNE H6309 negd Reverse sign of integer - else + ELSE nega negb sbca #$00 - endc + ENDC L4599 std 1,y Save integer result lda #1 Force type to integer & return sta ,y @@ -9875,26 +9871,25 @@ rts * ABS for Real #'s - ifeq H6309-true -*L45AE aim #$fe,5,y Force sign of real # to positive -L45AE fcb $62,$fe,$25 - else + IFNE H6309 +L45AE aim #$fe,5,y Force sign of real # to positive + ELSE L45AE lda 5,y Get sign bit for Real # anda #$FE Force to positive sta 5,y Save sign bit back & return rts - endc + ENDC * ABS for Integer's L45B5 ldd 1,y Get integer bpl L45BF If positive already, exit - ifeq H6309-true + IFNE H6309 negd Force to positive - else + ELSE nega NEGD (force to positive) negb sbca #$00 - endc + ENDC std 1,y Save positive value back L45BF rts @@ -10830,12 +10825,12 @@ L4CE1 lda ,u Get sign of 5 byte # bpl L4CEE If positive, skip ahead - ifeq H6309-true + IFNE H6309 clrd Clr 5 bytes @ u - else + ELSE clra clrb - endc + ENDC std ,u std 2,u sta 4,u @@ -10912,12 +10907,12 @@ L4DCE fdb $0E12,$14A2,$BB40,$E62D,$3619,$62E9 - ifeq H6309-true + IFNE H6309 L4DDA clrd - else + ELSE L4DDA clra clrb - endc + ENDC std