Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing the Aztec C-compiler to work - SysCallWriteRand was broken #48

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

skx
Copy link
Owner

@skx skx commented Apr 24, 2024

This pull request, once complete, will close #38 by resolving the problem that keeps the AS.com assembler from assembling a working output file (.O).

The problem seems to be related to file-based I/O, but I've not yet worked out out.

So far this pull request:

  • Adds more debug-output
  • Switches to using fcb.SIZE rather than 36 to avoid mistakes.
  • Updates to use the real slice offsets for data-copies.
  • Corrects a bug where the DMA area was hardcoded to be 0x0080 for FindFirst
    • This didn't help, but was obviously wrong.

I've added two new files beneath samples/:

  • write.asm / write.com
    • Write 255 sequential records to a file, containing ascending blocks.
      • i.e one block of 0x00 bytes, then one block of 0x01 bytes.
  • read.asm / read.com
    • Perform 255 sequential reads to a file, verify the contents are correct.
    • i.e. block 0x00 should have contents onlyu of 0x00, block 0x01 should contain 0x01, block 0xcd should contain only 0xcd, etc.

No errors/surprises in the sequential reads/writes. This strongly makes me consider the errors are in the random read/write functions - they will be the next to test.

skx added 4 commits April 24, 2024 19:05
This pull request, once complete, will close #38 by resolving the
problem that keeps the AS.com assembler from assembling a working
output file (.O).

The problem seems to be related to file-based I/O, but I've not yet
worked out out.

So far this pull request:

* Adds more debug-output
* Switches to using fcb.SIZE rather than 36 to avoid mistakes.
* Updates to use the real slice offsets for data-copies.
* Corrects a bug where the DMA area was hardcoded to be 0x0080 for FindFirst
  * This didn't help, but was obviously wrong.
I was incorrectly adding padding.
@skx
Copy link
Owner Author

skx commented Apr 24, 2024

Fixed. I'd made a backwards test when considering padding.

Everything works now:


A>cc hello 

C Vers. 1.06D 8080  (C) 1982 1983 1984 by Manx Software Systems

A>as hello

8080 Assembler Vers. 1.06D

A>ln hello.o c.lib

C Linker Vers. 1.06D
Base: 0100   Code: 1aec  Data: 01ef  Udata: 0250  Total: 001f30

A>hello

Hello, world

A>type hello.c

/*
 * CC HELLO
 * AS HELLO
 * LN HELLO.O C.LIB
 */
#include "STDIO.H"

main(argc, argv)
int argc;
char *argv[];
{
   printf("Hello, world\n");
   return 0;
}

@skx skx changed the title Work towards allowing the Aztec C-compiler to work. Allowing the Aztec C-compiler to work - SysCallWriteRand was broken Apr 24, 2024
@skx skx marked this pull request as ready for review April 24, 2024 17:02
@skx skx merged commit 9365f43 into master Apr 24, 2024
2 checks passed
@skx skx deleted the 38-assembler branch April 24, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aztec C compiler doesn't work
1 participant