Changes due to code review.

This commit is contained in:
IrgendwerA8
2019-03-21 20:43:07 +01:00
committed by Oliver Schmidt
parent 399250a105
commit db8bd84a82
12 changed files with 39 additions and 40 deletions

View File

@@ -181,7 +181,6 @@ SRCDIRS += common \
mouse \
runtime \
serial \
specialmath \
tgi \
zlib

View File

@@ -7,7 +7,7 @@
.export _cputcxy, _cputc
.export plot, cputdirect, putchar
.import gotoxy, _mul40
.import gotoxy, __mul40
.importzp tmp4,ptr4
.import _revflag,setcursor
@@ -71,7 +71,7 @@ putchar:
sta (OLDADR),y
lda ROWCRS
jsr _mul40 ; destroys tmp4, carry is cleared
jsr __mul40 ; destroys tmp4, carry is cleared
adc SAVMSC ; add start of screen memory
sta ptr4
txa

View File

@@ -12,7 +12,7 @@
.export _mouse_txt_callbacks
.importzp tmp4
.import _mul40
.import __mul40
.importzp mouse_txt_char ; screen code of mouse cursor
.include "atari.inc"
@@ -108,7 +108,7 @@ movey:
lsr a ; convert y position to character line
lsr a
lsr a
jsr _mul40 ; carry is cleared by _mul40
jsr __mul40 ; carry is cleared by _mul40
adc SAVMSC
sta scrptr
txa

View File

@@ -8,7 +8,7 @@
.include "atari.inc"
.importzp tmp1,tmp4,ptr1,ptr2
.import _mul40,_clrscr
.import __mul40,_clrscr
.export __scroll
.proc __scroll
@@ -40,7 +40,7 @@ down_ok:lda SAVMSC
sta ptr2+1
lda tmp1
jsr _mul40
jsr __mul40
sta tmp4
lda ptr2
sec
@@ -103,7 +103,7 @@ up: sta tmp1 ; # of lines to scroll
jmp _clrscr
;multiply by 40 (xsize)
up_ok: jsr _mul40 ; carry is cleared by _mul40
up_ok: jsr __mul40 ; carry is cleared by __mul40
adc SAVMSC ; add start of screen mem
sta ptr2
txa

View File

@@ -4,7 +4,7 @@
; cursor handling, internal function
.include "atari.inc"
.import cursor,_mul40
.import cursor,__mul40
.export setcursor
.proc setcursor
@@ -14,7 +14,7 @@
sta (OLDADR),y
lda ROWCRS
jsr _mul40 ; function leaves with carry clear!
jsr __mul40 ; function leaves with carry clear!
adc SAVMSC ; add start of screen memory
sta OLDADR
txa

View File

@@ -10,7 +10,7 @@
.export _cputcxy, _cputc
.export plot, cputdirect, putchar
.import gotoxy, _mul20
.import gotoxy, __mul20
.importzp ptr4
.import setcursor
@@ -75,7 +75,7 @@ putchar:
pha ; save char
lda ROWCRS_5200
jsr _mul20 ; destroys tmp4, carry is cleared
jsr __mul20 ; destroys tmp4, carry is cleared
adc SAVMSC ; add start of screen memory
sta ptr4
txa

View File

@@ -8,15 +8,15 @@
; See "LICENSE" file for legal information.
;
;
; unsigned int __fastcall__ mul20(unsigned char value);
; unsigned int __fastcall__ _mul20(unsigned char value);
;
; REMARKS: Function is defined to return with carry-flag cleared
.importzp tmp4
.export _mul20
.export __mul20
.proc _mul20 ; = 30 bytes, 41/46 cycles
.proc __mul20 ; = 30 bytes, 41/46 cycles
sta tmp4 ; remember value for later addition...
ldx #0 ; clear high-byte

View File

@@ -8,15 +8,15 @@
; See "LICENSE" file for legal information.
;
;
; unsigned int __fastcall__ mul40(unsigned char value);
; unsigned int __fastcall__ _mul40(unsigned char value);
;
; REMARKS: Function is defined to return with carry-flag cleared
.importzp tmp4
.export _mul40
.export __mul40
.proc _mul40 ; = 33 bytes, 48/53 cycles
.proc __mul40 ; = 33 bytes, 48/53 cycles
sta tmp4 ; remember value for later addition...
ldx #0 ; clear high-byte