mirror of
https://github.com/irmen/prog8.git
synced 2024-09-08 10:55:08 +00:00
cx16 safe clobbers for now
This commit is contained in:
parent
d110d1cb5f
commit
dd4a56cb5f
@ -169,22 +169,24 @@ cx16 {
|
|||||||
; ---- Commander X-16 additions on top of C64 kernal routines ----
|
; ---- Commander X-16 additions on top of C64 kernal routines ----
|
||||||
; spelling of the names is taken from the Commander X-16 rom sources
|
; spelling of the names is taken from the Commander X-16 rom sources
|
||||||
|
|
||||||
|
; TODO specify the correct clobbers for alle these functions, for simplicity all 3 regs are marked clobbered atm
|
||||||
|
|
||||||
; supported C128 additions
|
; supported C128 additions
|
||||||
romsub $ff4a = close_all()
|
romsub $ff4a = close_all() clobbers(A,X,Y)
|
||||||
romsub $ff59 = lkupla()
|
romsub $ff59 = lkupla() clobbers(A,X,Y)
|
||||||
romsub $ff5c = lkupsa()
|
romsub $ff5c = lkupsa() clobbers(A,X,Y)
|
||||||
romsub $ff5f = screen_set_mode(ubyte mode @A) clobbers(A, X, Y) -> ubyte @Pc
|
romsub $ff5f = screen_set_mode(ubyte mode @A) clobbers(A, X, Y) -> ubyte @Pc
|
||||||
romsub $ff62 = screen_set_charset(ubyte charset @A, uword charsetptr @XY) clobbers(A,X,Y) ; incompatible with C128 dlchr()
|
romsub $ff62 = screen_set_charset(ubyte charset @A, uword charsetptr @XY) clobbers(A,X,Y) ; incompatible with C128 dlchr()
|
||||||
romsub $ff65 = pfkey()
|
romsub $ff65 = pfkey() clobbers(A,X,Y)
|
||||||
romsub $ff6e = jsrfar()
|
romsub $ff6e = jsrfar() clobbers(A,X,Y)
|
||||||
romsub $ff74 = fetch()
|
romsub $ff74 = fetch() clobbers(A,X,Y)
|
||||||
romsub $ff77 = stash()
|
romsub $ff77 = stash() clobbers(A,X,Y)
|
||||||
romsub $ff7a = cmpare()
|
romsub $ff7a = cmpare() clobbers(A,X,Y)
|
||||||
romsub $ff7d = primm()
|
romsub $ff7d = primm() clobbers(A,X,Y)
|
||||||
|
|
||||||
; X16 additions
|
; X16 additions
|
||||||
romsub $ff44 = macptr()
|
romsub $ff44 = macptr() clobbers(A,X,Y)
|
||||||
romsub $ff47 = enter_basic(ubyte cold_or_warm @Pc)
|
romsub $ff47 = enter_basic(ubyte cold_or_warm @Pc) clobbers(A,X,Y)
|
||||||
romsub $ff68 = mouse_config(ubyte shape @A, ubyte scale @X) clobbers (A, X, Y)
|
romsub $ff68 = mouse_config(ubyte shape @A, ubyte scale @X) clobbers (A, X, Y)
|
||||||
romsub $ff6b = mouse_get(ubyte zpdataptr @X) clobbers(A)
|
romsub $ff6b = mouse_get(ubyte zpdataptr @X) clobbers(A)
|
||||||
romsub $ff71 = mouse_scan() clobbers(A, X, Y)
|
romsub $ff71 = mouse_scan() clobbers(A, X, Y)
|
||||||
@ -194,51 +196,50 @@ romsub $ff4d = clock_set_date_time() clobbers(A, X, Y) ; args: r0, r1, r2,
|
|||||||
romsub $ff50 = clock_get_date_time() clobbers(A) ; outout args: r0, r1, r2, r3L
|
romsub $ff50 = clock_get_date_time() clobbers(A) ; outout args: r0, r1, r2, r3L
|
||||||
|
|
||||||
; high level graphics & fonts
|
; high level graphics & fonts
|
||||||
; TODO specify the correct clobbers for GRAPH and FB functions
|
|
||||||
romsub $ff20 = GRAPH_init() clobbers(A,X,Y) ; uses vectors=r0
|
romsub $ff20 = GRAPH_init() clobbers(A,X,Y) ; uses vectors=r0
|
||||||
romsub $ff23 = GRAPH_clear() clobbers(A,X,Y)
|
romsub $ff23 = GRAPH_clear() clobbers(A,X,Y)
|
||||||
romsub $ff26 = GRAPH_set_window() ; uses x=r0, y=r1, width=r2, height=r3
|
romsub $ff26 = GRAPH_set_window() clobbers(A,X,Y) ; uses x=r0, y=r1, width=r2, height=r3
|
||||||
romsub $ff29 = GRAPH_set_colors(ubyte stroke @A, ubyte fill @X, ubyte background @Y) clobbers (A,X,Y)
|
romsub $ff29 = GRAPH_set_colors(ubyte stroke @A, ubyte fill @X, ubyte background @Y) clobbers (A,X,Y)
|
||||||
romsub $ff2c = GRAPH_draw_line() clobbers(A,X,Y) ; uses x1=r0, y1=r1, x2=r2, y2=r3
|
romsub $ff2c = GRAPH_draw_line() clobbers(A,X,Y) ; uses x1=r0, y1=r1, x2=r2, y2=r3
|
||||||
romsub $ff2f = GRAPH_draw_rect(ubyte fill @Pc) clobbers(A,X,Y) ; uses x=r0, y=r1, width=r2, height=r3, cornerradius=r4
|
romsub $ff2f = GRAPH_draw_rect(ubyte fill @Pc) clobbers(A,X,Y) ; uses x=r0, y=r1, width=r2, height=r3, cornerradius=r4
|
||||||
romsub $ff32 = GRAPH_move_rect() ; uses sx=r0, sy=r1, tx=r2, ty=r3, width=r4, height=r5
|
romsub $ff32 = GRAPH_move_rect() clobbers(A,X,Y) ; uses sx=r0, sy=r1, tx=r2, ty=r3, width=r4, height=r5
|
||||||
romsub $ff35 = GRAPH_draw_oval(ubyte fill @Pc) ; uses x=r0, y=r1, width=r2, height=r3
|
romsub $ff35 = GRAPH_draw_oval(ubyte fill @Pc) clobbers(A,X,Y) ; uses x=r0, y=r1, width=r2, height=r3
|
||||||
romsub $ff38 = GRAPH_draw_image() ; uses x=r0, y=r1, ptr=r2, width=r3, height=r4
|
romsub $ff38 = GRAPH_draw_image() clobbers(A,X,Y) ; uses x=r0, y=r1, ptr=r2, width=r3, height=r4
|
||||||
romsub $ff3b = GRAPH_set_font() ; uses ptr=r0
|
romsub $ff3b = GRAPH_set_font() clobbers(A,X,Y) ; uses ptr=r0
|
||||||
romsub $ff3e = GRAPH_get_char_size(ubyte baseline @A, ubyte width @X, ubyte height_or_style @Y, ubyte is_control @Pc)
|
romsub $ff3e = GRAPH_get_char_size(ubyte baseline @A, ubyte width @X, ubyte height_or_style @Y, ubyte is_control @Pc) clobbers(A,X,Y)
|
||||||
romsub $ff41 = GRAPH_put_char(ubyte char @A) clobbers(A,X,Y) ; uses x=r0, y=r1
|
romsub $ff41 = GRAPH_put_char(ubyte char @A) clobbers(A,X,Y) ; uses x=r0, y=r1
|
||||||
|
|
||||||
; framebuffer
|
; framebuffer
|
||||||
romsub $fef6 = FB_init()
|
romsub $fef6 = FB_init() clobbers(A,X,Y)
|
||||||
romsub $fef9 = FB_get_info() -> byte @A ; also outputs width=r0, height=r1
|
romsub $fef9 = FB_get_info() clobbers(X,Y) -> byte @A ; also outputs width=r0, height=r1
|
||||||
romsub $fefc = FB_set_palette(ubyte index @A, ubyte bytecount @X) ; also uses pointer=r0
|
romsub $fefc = FB_set_palette(ubyte index @A, ubyte bytecount @X) clobbers(A,X,Y) ; also uses pointer=r0
|
||||||
romsub $feff = FB_cursor_position() ; uses x=r0, y=r1
|
romsub $feff = FB_cursor_position() clobbers(A,X,Y) ; uses x=r0, y=r1
|
||||||
romsub $ff02 = FB_cursor_next_line() ; uses x=r0
|
romsub $ff02 = FB_cursor_next_line() clobbers(A,X,Y) ; uses x=r0
|
||||||
romsub $ff05 = FB_get_pixel() -> ubyte @A
|
romsub $ff05 = FB_get_pixel() clobbers(X,Y) -> ubyte @A
|
||||||
romsub $ff08 = FB_get_pixels() ; uses ptr=r0, count=r1
|
romsub $ff08 = FB_get_pixels() clobbers(A,X,Y) ; uses ptr=r0, count=r1
|
||||||
romsub $ff0b = FB_set_pixel(ubyte color @A)
|
romsub $ff0b = FB_set_pixel(ubyte color @A) clobbers(A,X,Y)
|
||||||
romsub $ff0e = FB_set_pixels() ; uses ptr=r0, count=r1
|
romsub $ff0e = FB_set_pixels() clobbers(A,X,Y) ; uses ptr=r0, count=r1
|
||||||
romsub $ff11 = FB_set_8_pixels(ubyte pattern @A, ubyte color @X)
|
romsub $ff11 = FB_set_8_pixels(ubyte pattern @A, ubyte color @X) clobbers(A,X,Y)
|
||||||
romsub $ff14 = FB_set_8_pixels_opaque(ubyte pattern @A, ubyte color1 @X, ubyte color2 @Y) ; also uses mask=r0L
|
romsub $ff14 = FB_set_8_pixels_opaque(ubyte pattern @A, ubyte color1 @X, ubyte color2 @Y) clobbers(A,X,Y) ; also uses mask=r0L
|
||||||
romsub $ff17 = FB_fill_pixels(ubyte color @A) ; also uses count=r0, step=r1
|
romsub $ff17 = FB_fill_pixels(ubyte color @A) clobbers(A,X,Y) ; also uses count=r0, step=r1
|
||||||
romsub $ff1a = FB_filter_pixels() ; uses ptr=r0, count=r1
|
romsub $ff1a = FB_filter_pixels() clobbers(A,X,Y) ; uses ptr=r0, count=r1
|
||||||
romsub $ff1d = FB_move_pixels() ; uses sx=r0, sy=r1, tx=r2, ty=r3, count=r4
|
romsub $ff1d = FB_move_pixels() clobbers(A,X,Y) ; uses sx=r0, sy=r1, tx=r2, ty=r3, count=r4
|
||||||
|
|
||||||
; misc
|
; misc
|
||||||
romsub $fef0 = sprite_set_image(ubyte number @A, ubyte width @X, ubyte height @Y, ubyte apply_mask @Pc) -> ubyte @Pc ; also uses pixels=r0, mask=r1, bpp=r2L
|
romsub $fef0 = sprite_set_image(ubyte number @A, ubyte width @X, ubyte height @Y, ubyte apply_mask @Pc) clobbers(A,X,Y) -> ubyte @Pc ; also uses pixels=r0, mask=r1, bpp=r2L
|
||||||
romsub $fef3 = sprite_set_position(ubyte number @A) ; also uses x=r0 and y=r1
|
romsub $fef3 = sprite_set_position(ubyte number @A) clobbers(A,X,Y) ; also uses x=r0 and y=r1
|
||||||
romsub $fee4 = memory_fill(ubyte value @A) ; uses address=r0, num_bytes=r1
|
romsub $fee4 = memory_fill(ubyte value @A) clobbers(A,X,Y) ; uses address=r0, num_bytes=r1
|
||||||
romsub $fee7 = memory_copy() ; uses source=r0, target=r1, num_bytes=r2
|
romsub $fee7 = memory_copy() clobbers(A,X,Y) ; uses source=r0, target=r1, num_bytes=r2
|
||||||
romsub $feea = memory_crc() ; uses address=r0, num_bytes=r1 result->r2
|
romsub $feea = memory_crc() clobbers(A,X,Y) ; uses address=r0, num_bytes=r1 result->r2
|
||||||
romsub $feed = memory_decompress() ; uses input=r0, output=r1 result->r1
|
romsub $feed = memory_decompress() clobbers(A,X,Y) ; uses input=r0, output=r1 result->r1
|
||||||
romsub $fedb = console_init() ; uses x=r0, y=r1, width=r2, height=r3
|
romsub $fedb = console_init() clobbers(A,X,Y) ; uses x=r0, y=r1, width=r2, height=r3
|
||||||
romsub $fede = console_put_char(ubyte char @A, ubyte wrapping @Pc)
|
romsub $fede = console_put_char(ubyte char @A, ubyte wrapping @Pc) clobbers(A,X,Y)
|
||||||
romsub $fee1 = console_get_char() -> ubyte @A
|
romsub $fee1 = console_get_char() clobbers(X,Y) -> ubyte @A
|
||||||
romsub $fed8 = console_put_image() ; uses ptr=r0, width=r1, height=r2
|
romsub $fed8 = console_put_image() clobbers(A,X,Y) ; uses ptr=r0, width=r1, height=r2
|
||||||
romsub $fed5 = console_set_paging_message() ; uses messageptr=r0
|
romsub $fed5 = console_set_paging_message() clobbers(A,X,Y) ; uses messageptr=r0
|
||||||
romsub $fed2 = kbdbuf_put(ubyte key @A)
|
romsub $fed2 = kbdbuf_put(ubyte key @A) clobbers(A,X,Y)
|
||||||
romsub $fecf = entropy_get() -> ubyte @A, ubyte @X, ubyte @Y
|
romsub $fecf = entropy_get() -> ubyte @A, ubyte @X, ubyte @Y
|
||||||
romsub $fecc = monitor()
|
romsub $fecc = monitor() clobbers(A,X,Y)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user