Skip to content

Commit

Permalink
File organization, dir for source code and input files
Browse files Browse the repository at this point in the history
  • Loading branch information
KleyLima committed Jul 16, 2020
1 parent 8de042b commit 8353544
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 26 deletions.
20 changes: 0 additions & 20 deletions enter.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions input_total.txt → inputs/input_total.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ F0 FF FF 03 40 00 05 60 00 07 80 00 10 A0 00 0B

52 45 41 4C 20 20 20 20 54 58 54 20 00 4C D4 6E
8D 39 8D 39 00 00 B1 70 8D 39 02 00 2E 0F 00 00
09
Empty file added source/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion fat.py → source/fat.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

from reserved_area import ReservedArea, Input
from source.reserved_area import ReservedArea, Input


class Fat(ReservedArea):
Expand Down
2 changes: 1 addition & 1 deletion file.py → source/file.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf -8 -*-

from reserved_area import ReservedArea, Hex
from source.reserved_area import ReservedArea, Hex
from utils.bin import Bin
from utils.enter_data import Input

Expand Down
9 changes: 5 additions & 4 deletions ram.py → source/ram.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-

from fat import Fat
from file import File
from reserved_area import ReservedArea, Hex
from source.fat import Fat
from source.file import File
from source.reserved_area import ReservedArea, Hex


class RAM(ReservedArea):
Expand Down Expand Up @@ -50,11 +50,12 @@ def calc_offset_to_cluster(self):
, root_dir_size=self.root_dir_size.vl_hex, cluster=cluster,
cluster_size=self.bytes_sector_hex.vl_hex)
print(f"Use the command: D {offset} to {cluster} cluster")
print(f"For the lasts 32 chars of {cluster}-1 use D [{cluster} - 20h]")
print(f"For the lasts 32 chars of {cluster}-1 cluster use D [{offset} - 20h]")


if __name__ == '__main__':
na = RAM()
na.new_file()
na.files[0].calc_used_clusters()
print(na.files[0].used_clusters)
na.calc_offset_to_cluster()
File renamed without changes.

0 comments on commit 8353544

Please sign in to comment.