]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/utscopy.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / utscopy.s
index adf8a006efeaeb98b90f1041cd91c8c3d9ffa956..d89f2d5186adc81e06deedc73a135601db9313d4 100644 (file)
 
 ; Table with offsets into struct utsname
 fieldoffs:
-        .byte   utsname_sysname
-        .byte   utsname_nodename
-        .byte   utsname_release
-        .byte   utsname_version
-        .byte   utsname_machine
+        .byte   utsname::sysname
+        .byte   utsname::nodename
+        .byte   utsname::release
+        .byte   utsname::version
+        .byte   utsname::machine
+
+fieldcount = * - fieldoffs
 
 ;--------------------------------------------------------------------------
 
@@ -45,7 +47,7 @@ fieldoffs:
         stx     tmp1            ; Field number
 
 next:   ldy     tmp1
-        cpy     #utsname_fieldcount
+        cpy     #fieldcount
         beq     done
         inc     tmp1            ; Bump field counter
         lda     fieldoffs,y     ; Get next field offset