Skip to content

Commit

Permalink
Merge pull request #3 from erhanbaris/reorganizing
Browse files Browse the repository at this point in the history
Reorganizing
  • Loading branch information
erhanbaris authored Aug 16, 2024
2 parents f7e8f9d + c4dd331 commit 5b88df1
Show file tree
Hide file tree
Showing 15 changed files with 983 additions and 602 deletions.
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,43 @@ Expected output:
0610: fb 60 00
```

## Data types
Compiler works with primative date types.

### Byte
It takes up one byte of space. It is written in three different ways depending on the number type.
Examples:
```assembly
$01 ; in hexadecimal format
$CC ; in hexadecimal format
%00000000 ; in binary format
%01010011 ; in binary format
128 ; in decimal format
2 ; in decimal format
```

### Word
It takes up two bytes of space. It is written in three different ways depending on the number type.
Examples:
```assembly
$0122 ; in hexadecimal format
$CC33 ; in hexadecimal format
%0000000000000000 ; in binary format
%0101001100000000 ; in binary format
123456 ; in decimal format
888888 ; in decimal format
```

### Ascii
It takes up different sizes of space depending on the definition. The text must be written between double quotes.
```assembly
"Hello world" ; in decimal format
```

## Available directives

### .org
Expand Down Expand Up @@ -105,6 +142,17 @@ Print warning message on compilation time.
22:05:16 [WARN] timu6502asm compiler works partial
```

### .include
Import another file.
```assembly
.include "header.asm"
.include "body.asm"
.include "footer.asm"
```
```
22:05:16 [WARN] timu6502asm compiler works partial
```

There are many things to do. Here are the some todos:
- [ ] Case insensitivity
- [ ] Rom file generation
Expand Down
Loading

0 comments on commit 5b88df1

Please sign in to comment.