Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fkokosinski committed Jun 5, 2024
1 parent 51a6a14 commit 895a2cb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
# PDP-1 Playground

## Dependencies
```
sudo apt-get install git build-essential flex bison texinfo libgmp3-dev libmpfr-dev libmpc-dev simh dejagnu
```

## Building binutils
```
cd pdp1-binutils
./configure --target=pdp1-elf --disable-sim
make -j $(nproc)
sudo make install
```

## Building gcc
```
cd pdp1-gcc
./configure --target=pdp1-elf --enable-languages=c --disable-bootstrap
make -j $(nproc) all-gcc
```

## Building and running samples

```
cd c-print-for-loop
make main.s main.rim run
```

## Running tests
```
runtest --srcdir $(pwd)
```
5 changes: 4 additions & 1 deletion common/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ default: $(APP_NAME).rim
%.s: %.c
../pdp1-gcc/host-x86_64-pc-linux-gnu/gcc/cc1 $<

%.o: %.[Ss]
%.o: %.S
pdp1-elf-as $< -o $@

%.o: %.s
pdp1-elf-as $< -o $@

$(APP_NAME).bin: ../common/common.ld $(objects)
Expand Down

0 comments on commit 895a2cb

Please sign in to comment.